##---------------------------------------------REMOVE ALL OBJECTS FROM MEMORY------------------------------------------##
rm(list=ls()) 
## --------------------------------------------- SET WORKING DIRECTORY ------------------------------------------##
dir.create("WP1")
setwd("~/WP1")
.libPaths( c( .libPaths(), "~/R/packages/3.1.0") )
## --------------------------------------------- INSTALL AND LOAD PACKAGES --------------------------------------------##
install.packages("car", lib="~/R/packages/3.2.1")
library(car, lib.loc="~/R/packages/3.2.1")
install.packages("reshape", lib="~/R/packages/3.2.1")
library(reshape, lib.loc="~/R/packages/3.2.1")
install.packages("plyr", lib="~/R/packages/3.2.1")
library(plyr, lib.loc="~/R/packages/3.2.1")
install.packages("arm", lib="~/R/packages/3.2.1")
library(arm)
install.packages("mice", lib="~/R/packages/3.2.1")
library(mice)
install.packages("ggplot2", lib="~/R/packages/3.2.1")
library(ggplot2)
install.packages("grid", lib="~/R/packages/3.2.1")
library(grid)
install.packages("RColorBrewer", lib="~/R/packages/3.2.1")
library(RColorBrewer)
library(foreign)
## --------------------------------------------- READING IN DATA FROM A FILE ------------------------------------------##
dir.create("data")
# Download data from http://discover.ukdataservice.ac.uk/series/?sn=200001 and extract data into the data subfolder.
# BCS 3 derived and complete
bcs3derived <-read.dta("~/WP1/data/UKDA-3723-stata9_se/stata9_se/bcs3derived.dta")
bcs3 <-read.dta("~/WP1/data/UKDA-3723-stata9_se/stata9_se/3723.dta")
#BCS 1970 Key Variables
bcs70_keyvariables <- read.dta("~/WP1/data/UKDA-5805-stata8/stata8/bcs70_keyvariables.dta")
#BCS 1996
bcs96x <- read.dta("~/WP1/data/UKDA-3833-stata9/stata9/bcs96x.dta")
bcs5derived <- read.dta("~/WP1/data/UKDA-3833-stata9/stata9/bcs5derived.dta")
#BCS 2000
bcs2000x <-read.dta("~/WP1/data/UKDA-5558-stata9_se/stata9_se/bcs2000.dta")
bcs6derived <-read.dta("~/WP1/data/UKDA-5558-stata9_se/stata9_se/bcs6derived.dta")
# BCS 2004
bcs2004x <-read.dta("~/WP1/data/UKDA-5585-stata9_se/stata9_se/bcs_2004_followup.dta")
# BCS 2008
bcs2008x <-read.dta("~/WP1/data/UKDA-6557-stata9_se/stata9_se/bcs_2008_followup.dta")
# BCS 2012
bcs2012x <-read.dta("~/WP1/data/UKDA-7473-stata11/stata11/bcs70_2012_flatfile.dta")
bcs9derived <-read.dta("~/WP1/data/UKDA-7473-stata11/stata11/bcs70_2012_derived.dta")
# BCS employment histories
bcsemploy <-read.dta("~/WP1/data/UKDA-5613-stata8/stata8/bcs_employment_histories_1996-2004.dta")
# BCS 4 derived
bcs4derived <-read.dta("~/WP1/data/UKDA-3535-stata9_se/stata9_se/bcs4derived.dta")
# BCS 16 year arithmetic data
bcs16maths <-read.dta("~/WP1/data/UKDA-6095-stata8/stata8/bcs70_16-year_arithmetic_ data.dta")
# BCS 16 year head teachers survey
bcs16htq <-read.dta("~/WP1/data/UKDA-5225-stata8/stata8/bcs70_htq.dta")
# BCS Age 16 survey
bcs7016 <-read.dta("~/WP1/data/UKDA-3535-stata9_se/stata9_se/bcs7016x.dta")

# Create observational data variables for merging later
bcs2000x$obs30 <-1
bcsemploy$obsemploy <-1

## --------------------------------------------- DELETING VARIABLES ---------------------------------------------------##
names(bcs3derived)[names(bcs3derived) == 'BCSID'] <- 'bcsid'
bcs3d <-subset(bcs3derived, select=c(bcsid, BD3RREAD, BD3MATHS, BD3READ, BD3PSOC))
rm(bcs3derived)
bcs3 <-subset(bcs3,select=c(bcsid,back10p,j238))  
bcs70_keyvar <- subset(bcs70_keyvariables, select=c(bcsid, bsex, b10maths, b10read, b16fsoc, b16msoc, b16psoc))
rm(bcs70_keyvariables)
bcs1996 <-subset(bcs96x, select=c(bcsid, sex, b960322, wklypayc, rgsc91, hourswk))
rm(bcs96x)
names(bcs5derived)[names(bcs5derived) == 'BCSID'] <- 'bcsid'
bcs96derived <-subset(bcs5derived, select=c(BD5GOR, bcsid))
rm(bcs5derived)
bcs2000 <-subset(bcs2000x,select=c(bcsid, dmsex, ms, cgropay, cgroprd, sc, edqsub56, edqwhe56, edqloc56, edqsub57, 
edqwhe57, edqloc57, edqsub58, edqwhe58, edqloc58, edqsub59, edqwhe59, edqloc59, edqsub60, edqwhe60, edqloc60, 
edqsub61, edqwhe61, edqloc61, edqsub62, edqwhe62, edqloc62, edqsub63, edqwhe63, edqloc63, edqsub64, edqwhe64, 
edqloc64, edqsub65, edqwhe65, edqloc65, edqsub66, edqwhe66, edqloc66, edqsub67, edqwhe67, edqloc67, edqsub68, 
edqwhe68, edqloc68, edqsub69, edqwhe69, edqloc69, edqsub71, edqwhe71, edqloc71, edqsub72, edqwhe72, edqloc72, 
edqsub73, edqwhe73, edqloc73, edqsub74, edqwhe74, edqloc74, edqsub75, edqwhe75, edqloc75, edqsub76, edqwhe76, 
edqloc76, edqsub77, edqwhe77, edqloc77, edqsub78, edqwhe78, edqloc78, edqsub79, edqwhe79, edqloc79, edqsub80, 
edqwhe80, edqloc80, edqsub81, edqwhe81, edqloc81, edqsub82, edqwhe82, edqloc82, edqsub83, edqwhe83, edqloc83, 
edqwhe86, edqloc86, edqsub86, edqwh101, edqlo101, edqsub87, edqwh102, edqlo102, econact, actagel2, eddiped, obs30))
rm(bcs2000x)
names(bcs6derived)[names(bcs6derived) == 'BCSID'] <- 'bcsid'
bcs00derived <-subset(bcs6derived, select=c(bcsid, BD6GOR, HIACA00, NVQACA00))
rm(bcs6derived)
bcs2004 <-subset(bcs2004x, select=c(bd7sex, b7cgropy, b7cgropd, b7seg, b7sc, b7sic92, bd7ns8, b7mainjb, b7cstamo, 
b7cjstty, bd7cjoth, b7xso000, bcsid, b7gor, b7region, b7intmon, b7intyr, b7marst2, bd7nchhh, bd7ecact, bd7nach,
bd7ochhh, b7abnu91))
rm(bcs2004x)
bcs2008 <-subset(bcs2008x, select=c(bcsid, b8cmsex, b8cgropy, b8cgropd, b8ms, b8sc, b8chour1, b8cgrowk, b8gor))
rm(bcs2008x)
names(bcs2012x)[names(bcs2012x) == 'BCSID'] <- 'bcsid'
bcs2012 <-subset(bcs2012x, select=c(B9GROA, B9GROP, B9CSC, B9CMSEX, bcsid))
rm(bcs2012x)
names(bcs9derived)[names(bcs9derived) == 'BCSID'] <- 'bcsid'
bcs12derived<-subset(bcs9derived, select=c(bcsid, BD9GOR, BD9MS, BD9TOTAC, BD9TOTOC, BD9ALFED, BD9ACHQ1, BD9HACHQ, BD9TOTCE, BD9ECACT))
rm(bcs9derived)
names(bcs4derived)[names(bcs4derived) == 'BCSID'] <- 'bcsid'
bcs1986derived <-subset(bcs4derived,select=c(bcsid, BD4READ, BD4RDAGE))
rm(bcs4derived)
bcs1986 <-subset(bcs16maths, select=c(bcsid, mathscore))
rm(bcs16maths)
bcs16main <-subset(bcs7016, select=c(bcsid, t2a1_2, t2c1_2, t7_2, t8_2, t7_1, jb34c, jb27a1, jb27a2, 
jb27a3, jb27a4, jb27a5, jb27a6, jb27a7, jb27a8, jb27a9, jb27a10, jb27a11, jb27a12, jb27a13, jb27a14, jb27a15,
jb27a16,jb27a17))
rm(bcs7016)
bcs16heads <-subset(bcs16htq, select=c(bcsid, sexsch, schtype, ssector_n))
rm(bcs16htq)

## --------------------------------------------- MERGE DATASETS ---------------------------------------------------##
bcscomplete<-Reduce(function(x, y) merge(x, y, all=TRUE), list(bcs2004, bcs1996, bcs96derived, bcs2000, bcs00derived, bcs2008, bcs2012, bcs12derived))

bcs2004complete<-Reduce(function(x, y) merge(x, y, all.x=TRUE), list(bcscomplete, bcs3, bcs3d, bcs70_keyvar,bcsemploy, bcs1986, bcs1986derived,bcs16main,bcs16heads))
rm(bcs3, bcs3d, bcs70_keyvar, bcs1996, bcs96derived, bcs2000, bcs00derived, bcs2004, bcs2008, bcs2012, bcs12derived, bcsemploy, bcs1986, bcs16main,
   bcs16heads, bcscomplete, bcs1986derived)
names(bcs2004complete)
d <-bcs2004complete
rm(bcs2004complete)

## --------------------------------------------- RECODING VARIABLES  ---------------------------------------------------##

##--------------------------------------------- Independent variables---------------------------------------------
 
#--------------------------------------------- Work Experience ---------------------------------------------
d$jstmth1[d$jstmth1==-1] <-NA
d$jstmth2[d$jstmth2==-1] <-NA
d$jstmth3[d$jstmth3==-1] <-NA
d$jstmth4[d$jstmth4==-1] <-NA
d$jstmth5[d$jstmth5==-1] <-NA
d$jstmth6[d$jstmth6==-1] <-NA
d$jstmth7[d$jstmth7==-1] <-NA
d$jstmth8[d$jstmth8==-1] <-NA
d$jstmth9[d$jstmth9==-1] <-NA
d$jstmth10[d$jstmth10==-1] <-NA
d$jstmth11[d$jstmth11==-1] <-NA
d$jstmth12[d$jstmth12==-1] <-NA
d$jstmth13[d$jstmth13==-1] <-NA
d$jstmth14[d$jstmth14==-1] <-NA
d$jstmth15[d$jstmth15==-1] <-NA

d$jstyr1[d$jstyr1==-1] <-NA
d$jstyr2[d$jstyr2==-1] <-NA
d$jstyr3[d$jstyr3==-1] <-NA
d$jstyr4[d$jstyr4==-1] <-NA
d$jstyr5[d$jstyr5==-1] <-NA
d$jstyr6[d$jstyr6==-1] <-NA
d$jstyr7[d$jstyr7==-1] <-NA
d$jstyr8[d$jstyr8==-1] <-NA
d$jstyr9[d$jstyr9==-1] <-NA
d$jstyr10[d$jstyr10==-1] <-NA
d$jstyr11[d$jstyr11==-1] <-NA
d$jstyr12[d$jstyr12==-1] <-NA
d$jstyr13[d$jstyr13==-1] <-NA
d$jstyr14[d$jstyr14==-1] <-NA
d$jstyr15[d$jstyr15==-1] <-NA

d$mendj1[d$mendj1==-1] <-NA
d$mendj2[d$mendj1==-1] <-NA
d$mendj3[d$mendj1==-1] <-NA
d$mendj4[d$mendj1==-1] <-NA
d$mendj5[d$mendj1==-1] <-NA
d$mendj6[d$mendj1==-1] <-NA
d$mendj7[d$mendj1==-1] <-NA
d$mendj8[d$mendj1==-1] <-NA
d$mendj9[d$mendj1==-1] <-NA
d$mendj10[d$mendj1==-1] <-NA
d$mendj11[d$mendj1==-1] <-NA
d$mendj12[d$mendj1==-1] <-NA
d$mendj13[d$mendj1==-1] <-NA
d$mendj14[d$mendj1==-1] <-NA
d$mendj15[d$mendj1==-1] <-NA

d$jstyr1[d$jstyr1<1986] <-NA
d$jstyr2[d$jstyr2<1986] <-NA
d$jstyr3[d$jstyr3<1986] <-NA
d$jstyr4[d$jstyr4<1986] <-NA
d$jstyr5[d$jstyr5<1986] <-NA
d$jstyr6[d$jstyr6<1986] <-NA
d$jstyr7[d$jstyr7<1986] <-NA
d$jstyr8[d$jstyr8<1986] <-NA
d$jstyr9[d$jstyr9<1986] <-NA
d$jstyr10[d$jstyr10<1986] <-NA
d$jstyr11[d$jstyr11<1986] <-NA
d$jstyr12[d$jstyr12<1986] <-NA
d$jstyr13[d$jstyr13<1986] <-NA
d$jstyr14[d$jstyr14<1986] <-NA
d$jstyr15[d$jstyr15<1986] <-NA

d$yendj1[d$yendj1==-1] <-NA
d$yendj2[d$yendj2==-1] <-NA
d$yendj3[d$yendj3==-1] <-NA
d$yendj4[d$yendj4==-1] <-NA
d$yendj5[d$yendj5==-1] <-NA
d$yendj6[d$yendj6==-1] <-NA
d$yendj7[d$yendj7==-1] <-NA
d$yendj8[d$yendj8==-1] <-NA
d$yendj9[d$yendj9==-1] <-NA
d$yendj10[d$yendj10==-1] <-NA
d$yendj11[d$yendj11==-1] <-NA
d$yendj12[d$yendj12==-1] <-NA
d$yendj13[d$yendj13==-1] <-NA
d$yendj14[d$yendj14==-1] <-NA
d$yendj15[d$yendj15==-1] <-NA

d$yendj1[d$yendj1==-6] <-NA
d$yendj2[d$yendj2==-6] <-NA
d$yendj3[d$yendj3==-6] <-NA
d$yendj4[d$yendj4==-6] <-NA
d$yendj5[d$yendj5==-6] <-NA
d$yendj6[d$yendj6==-6] <-NA
d$yendj7[d$yendj7==-6] <-NA
d$yendj8[d$yendj8==-6] <-NA
d$yendj9[d$yendj9==-6] <-NA
d$yendj10[d$yendj10==-6] <-NA
d$yendj11[d$yendj11==-6] <-NA
d$yendj12[d$yendj12==-6] <-NA
d$yendj13[d$yendj13==-6] <-NA
d$yendj14[d$yendj14==-6] <-NA
d$yendj15[d$yendj15==-6] <-NA

d$yendj1[d$yendj1<1986] <-NA
d$yendj2[d$yendj2<1986] <-NA
d$yendj3[d$yendj3<1986] <-NA
d$yendj4[d$yendj4<1986] <-NA
d$yendj5[d$yendj5<1986] <-NA
d$yendj6[d$yendj6<1986] <-NA
d$yendj7[d$yendj7<1986] <-NA
d$yendj8[d$yendj8<1986] <-NA
d$yendj9[d$yendj9<1986] <-NA
d$yendj10[d$yendj10<1986] <-NA
d$yendj11[d$yendj11<1986] <-NA
d$yendj12[d$yendj12<1986] <-NA
d$yendj13[d$yendj13<1986] <-NA
d$yendj14[d$yendj14<1986] <-NA
d$yendj15[d$yendj15<1986] <-NA

d$j1duration=(d$yendj1-d$jstyr1)
d$j1duration[d$j1duration<0] <-NA
d$j2duration=(d$yendj2-d$jstyr2)
d$j2duration[d$j2duration<0] <-NA
d$j3duration=(d$yendj3-d$jstyr3)
d$j3duration[d$j3duration<0] <-NA
d$j4duration=(d$yendj4-d$jstyr4)
d$j4duration[d$j4duration<0] <-NA
d$j5duration=(d$yendj5-d$jstyr5)
d$j5duration[d$j5duration<0] <-NA
d$j6duration=(d$yendj6-d$jstyr6)
d$j6duration[d$j6duration<0] <-NA
d$j7duration=(d$yendj7-d$jstyr7)
d$j7duration[d$j7duration<0] <-NA
d$j8duration=(d$yendj8-d$jstyr8)
d$j8duration[d$j8duration<0] <-NA
d$j9duration=(d$yendj9-d$jstyr9)
d$j9duration[d$j9duration<0] <-NA
d$j10duration=(d$yendj10-d$jstyr10)
d$j10duration[d$j10duration<0] <-NA
d$j11duration=(d$yendj11-d$jstyr11)
d$j11duration[d$j11duration<0] <-NA
d$j12duration=(d$yendj12-d$jstyr12)
d$j12duration[d$j12duration<0] <-NA
d$j13duration=(d$yendj13-d$jstyr13)
d$j13duration[d$j13duration<0] <-NA
d$j14duration=(d$yendj14-d$jstyr14)
d$j14duration[d$j14duration<0] <-NA
d$j15duration=(d$yendj15-d$jstyr15)
d$j15duration[d$j15duration<0] <-NA

d$j1durationInMonths= d$j1duration*12+ d$mendj1-d$jstmth1
d$j2durationInMonths= d$j2duration*12+ d$mendj2-d$jstmth2
d$j3durationInMonths= d$j3duration*12+ d$mendj3-d$jstmth3
d$j4durationInMonths= d$j4duration*12+ d$mendj4-d$jstmth4
d$j5durationInMonths= d$j5duration*12+ d$mendj5-d$jstmth5
d$j6durationInMonths= d$j6duration*12+ d$mendj6-d$jstmth6
d$j7durationInMonths= d$j7duration*12+ d$mendj7-d$jstmth7
d$j8durationInMonths= d$j8duration*12+ d$mendj8-d$jstmth8
d$j9durationInMonths= d$j9duration*12+ d$mendj9-d$jstmth9
d$j10durationInMonths= d$j10duration*12+ d$mendj10-d$jstmth10
d$j11durationInMonths= d$j11duration*12+ d$mendj11-d$jstmth11
d$j12durationInMonths= d$j12duration*12+ d$mendj12-d$jstmth12
d$j13durationInMonths= d$j13duration*12+ d$mendj13-d$jstmth13
d$j14durationInMonths= d$j14duration*12+ d$mendj14-d$jstmth14
d$j15durationInMonths= d$j15duration*12+ d$mendj15-d$jstmth15

d$j1durationInMonths[d$j1durationInMonths==0] <-1
d$j2durationInMonths[d$j2durationInMonths==0] <-1
d$j3durationInMonths[d$j3durationInMonths==0] <-1
d$j4durationInMonths[d$j4durationInMonths==0] <-1
d$j5durationInMonths[d$j5durationInMonths==0] <-1
d$j6durationInMonths[d$j6durationInMonths==0] <-1
d$j7durationInMonths[d$j7durationInMonths==0] <-1
d$j8durationInMonths[d$j8durationInMonths==0] <-1
d$j9durationInMonths[d$j9durationInMonths==0] <-1
d$j10durationInMonths[d$j10durationInMonths==0] <-1
d$j11durationInMonths[d$j11durationInMonths==0] <-1
d$j12durationInMonths[d$j12durationInMonths==0] <-1
d$j13durationInMonths[d$j13durationInMonths==0] <-1
d$j14durationInMonths[d$j14durationInMonths==0] <-1
d$j15durationInMonths[d$j15durationInMonths==0] <-1

d$j1durationInMonths[d$j1durationInMonths<0] <-NA
d$j2durationInMonths[d$j2durationInMonths<0] <-NA
d$j3durationInMonths[d$j3durationInMonths<0] <-NA
d$j4durationInMonths[d$j4durationInMonths<0] <-NA
d$j5durationInMonths[d$j5durationInMonths<0] <-NA
d$j6durationInMonths[d$j6durationInMonths<0] <-NA
d$j7durationInMonths[d$j7durationInMonths<0] <-NA
d$j8durationInMonths[d$j8durationInMonths<0] <-NA
d$j9durationInMonths[d$j9durationInMonths<0] <-NA
d$j10durationInMonths[d$j10durationInMonths<0] <-NA
d$j11durationInMonths[d$j11durationInMonths<0] <-NA
d$j12durationInMonths[d$j12durationInMonths<0] <-NA
d$j13durationInMonths[d$j13durationInMonths<0] <-NA
d$j14durationInMonths[d$j14durationInMonths<0] <-NA
d$j15durationInMonths[d$j15durationInMonths<0] <-NA

d$duration <-cbind(d$j1durationInMonths, d$j2durationInMonths, d$j3durationInMonths, d$j4durationInMonths,
			d$j5durationInMonths, d$j6durationInMonths, d$j7durationInMonths, d$j8durationInMonths, d$j9durationInMonths,
			d$j10durationInMonths, d$j11durationInMonths, d$j12durationInMonths, d$j13durationInMonths )

d$workexp=rowSums(d$duration, na.rm=TRUE)
d$workexp[is.na(d$obsemploy)] <-NA

# Work experience squared
d$workexpsq <-d$workexp^2

# Job tenure
summary(d$b7cstamo)
summary(d$b7cjstty)
d$b7cjstty[d$b7cjstty <=1985] <-NA
d$b7cjstty[d$b7cjstty ==2005] <-NA
d$b7cstamo[d$b7cjstty==NA] <-NA  
d$b7cjstty[d$b7cjstty>=9998] <-NA
d$cstartmo <-d$b7cstamo
d$cstartmo[d$cstartmo<=0] <-NA
d$daystart=15
d$cstartyr <-d$b7cjstty
d$currentjobstart <- as.Date( paste(d$cstartmo, d$daystart, d$cstartyr, sep = "." )  , format = "%m.%d.%Y" )
d$dayend=31
d$monthend=12
d$yearend=2004
d$currentjobend<- as.Date( paste(d$monthend, d$dayend, d$yearend, sep = "." )  , format = "%m.%d.%Y" )

d$cjdurationInMonths=(d$yearend-d$cstartyr)*12+d$monthend-d$cstartmo
d$cjdurationInMonths[d$cjdurationInMonths<=-1] <-NA

# Unemployment
d$actagel2[d$actagel2<16] <-NA 
d$lefted <-34-d$actagel2
d$yearlefted <-(2004-d$lefted)
d$monthlefted <-7
d$yeardiffleftedj1start <- d$jstyr1 - d$yearlefted
d$yeardiffleftedj1start[d$yeardiffleftedj1start<0] <-NA 
d$yeardiffleftedj1start[d$yeardiffleftedj1start==0] <-1  
d$datediffleftedj1st <- d$yeardiffleftedj1start*12+ d$jstmth1-d$monthlefted

d$j1j2datediffyr <-(d$yendj1-d$jstyr2)
d$j1j2datediffyr[d$j1j2datediffyr <0] <-NA
d$j2j3datediffyr <-(d$yendj2-d$jstyr3)
d$j2j3datediffyr[d$j2j3datediffyr <0] <-NA 
d$j3j4datediffyr <-(d$yendj3-d$jstyr4)
d$j3j4datediffyr[d$j3j4datediffyr <0]<-NA
d$j4j5datediffyr <-(d$yendj4-d$jstyr5)
d$j4j5datediffyr[d$j4j5datediffyr <0] <-NA
d$j5j6datediffyr <-(d$yendj5-d$jstyr6)
d$j5j6datediffyr[d$j5j6datediffyr <0] <-NA
d$j6j7datediffyr <-(d$yendj6-d$jstyr7)
d$j6j7datediffyr[d$j6j7datediffyr <0] <-NA
d$j7j8datediffyr <-(d$yendj7-d$jstyr8)
d$j7j8datediffyr[d$j7j8datediffyr <0] <-NA
d$j8j9datediffyr <-(d$yendj8-d$jstyr9)
d$j8j9datediffyr[d$j8j9datediffyr <0] <-NA
d$j9j10datediffyr <-(d$yendj9-d$jstyr10)
d$j9j10datediffyr[d$j9j10datediffyr <0] <-NA
d$j10j11datediffyr <-(d$yendj10-d$jstyr11)
d$j10j11datediffyr[d$j10j11datediffyr <0] <-NA
d$j11j12datediffyr <-(d$yendj11-d$jstyr12)
d$j11j12datediffyr[d$j11j12datediffyr <0] <-NA
d$j12j13datediffyr <-(d$yendj12-d$jstyr13)
d$j12j13datediffyr[d$j12j13datediffyr <0] <-NA
d$j13j14datediffyr <-(d$yendj13-d$jstyr14)
d$j13j14datediffyr[d$j13j14datediffyr <0] <-NA
d$j14j15datediffyr <-(d$yendj14-d$jstyr15)
d$j14j15datediffyr[d$j14j15datediffyr <0] <-NA
d$j15j16datediffyr <-(d$yendj15-d$jstyr16)
d$j15j16datediffyr[d$j15j16datediffyr <0] <-NA

d$j1j2datediffyr[d$j1j2datediffyr==0] <-1
d$j2j3datediffyr[d$j2j3datediffyr==0] <-1
d$j3j4datediffyr[d$j3j4datediffyr==0] <-1
d$j4j5datediffyr[d$j4j5datediffyr==0] <-1
d$j5j6datediffyr[d$j5j6datediffyr==0] <-1
d$j6j7datediffyr[d$j6j7datediffyr==0] <-1
d$j7j8datediffyr[d$j7j8datediffyr==0] <-1
d$j8j9datediffyr[d$j8j9datediffyr==0] <-1
d$j9j10datediffyr[d$j9j10datediffyr==0] <-1
d$j10j11datediffyr[d$j10j11datediffyr==0] <-1
d$j11j12datediffyr[d$j11j12datediffyr==0] <-1
d$j12j13datediffyr[d$j12j13datediffyr==0] <-1
d$j13j14datediffyr[d$j13j14datediffyr==0] <-1
d$j14j15datediffyr[d$j14j15datediffyr==0] <-1
d$j15j16datediffyr[d$j15j16datediffyr==0] <-1

d$j1j2datediff <- d$j1j2datediffyr*12+ d$jstmth2 - d$mendj1
d$j2j3datediff <- d$j2j3datediffyr*12+ d$jstmth3 - d$mendj2
d$j3j4datediff <- d$j3j4datediffyr*12+ d$jstmth4 - d$mendj3
d$j4j5datediff <- d$j4j5datediffyr*12+ d$jstmth5 - d$mendj4
d$j5j6datediff <-d$j5j6datediffyr*12+ d$jstmth6 - d$mendj5
d$j6j7datediff <- d$j6j7datediffyr*12+ d$jstmth7 - d$mendj6
d$j7j8datediff <- d$j7j8datediffyr*12+ d$jstmth8 - d$mendj7
d$j8j9datediff <- d$j8j9datediffyr*12+ d$jstmth9 - d$mendj8
d$j9j10datediff <- d$j9j10datediffyr*12+ d$jstmth10 - d$mendj9
d$j10j11datediff <- d$j10j11datediffyr*12+ d$jstmth11-d$mendj10
d$j11j12datediff <- d$j11j12datediffyr*12+ d$jstmth12-d$mendj11
d$j12j13datediff <- d$j12j13datediffyr*12+ d$jstmth13-d$mendj12
d$j13j14datediff <- d$j13j14datediffyr*12+ d$jstmth14-d$mendj13
d$j14j15datediff <- d$j14j15datediffyr*12+ d$jstmth15-d$mendj14
d$j15j16datediff <- d$j15j16datediffyr*12+ d$jstmth16-d$mendj15


d$unemployment1 <-d$j1j2datediff + d$j2j3datediff
d$unemployment2 <-d$j3j4datediff + d$j4j5datediff 
d$unemployment3 <-d$j5j6datediff + d$j6j7datediff
d$unemployment4 <-d$j7j8datediff + d$j8j9datediff
d$unemployment5 <-d$j9j10datediff + d$j10j11datediff
d$unemployment6 <-d$j11j12datediff + d$j12j13datediff
d$unemployment7 <-d$j13j14datediff + d$j14j15datediff
d$unemploy <-cbind(d$unemployment1, d$unemployment2, d$unemployment3, d$unemployment4, d$unemployment5, d$unemployment6, d$unemployment7)
d$unemployment <-rowSums(d$unemploy, na.rm = TRUE, dims = 1 )
d$unemployment[is.na(d$obsemploy)] <-NA

# Part-time work	
summary(d$bd7ecact)
d$parttime <-recode(d$bd7ecact, "'Refusal'=NA;'Other missing'=NA;'Full-time paid employee (30 or more hours a week)'=0;
					'Part-time paid employee (under 30 hours a week)'=1;'Part-time paid employee (under 30 hours a week)'=1;
					'Full-time self-employed'=0;'Part-time self-employed'=1;'Unemployed and seeking work'=NA;'Full-time education'=NA; 
					'On a government scheme for employment training'=NA; 'Temporarily sick/disabled'=NA;'Permanently sick/disabled'=NA;
					'Looking after home/family'=NA; 'Wholly retired'=NA; 'Other'=NA")
d$parttime[d$parttime=="Don't Know"] <-NA
d$parttimewk <-as.numeric(d$parttime==1)
summary(d$parttimewk)
d$work <-recode(d$bd7ecact, "'Refusal'=NA;'Other missing'=NA;'Full-time paid employee (30 or more hours a week)'=1;
					'Part-time paid employee (under 30 hours a week)'=1;'Part-time paid employee (under 30 hours a week)'=1;
					'Full-time self-employed'=1;'Part-time self-employed'=1;'Unemployed and seeking work'=0;'Full-time education'=0; 
					'On a government scheme for employment training'=0; 'Temporarily sick/disabled'=0;'Permanently sick/disabled'=0;
					'Looking after home/family'=0; 'Wholly retired'=0; 'Other'=0")
d$work[d$work=="Don't Know"] <-NA
d$work<-as.vector(d$work)
d$work<-as.factor(d$work)
d$working <- as.factor(d$work)
summary(d$working)

# Auxiliary variables

# Age 26
summary(d$hourswk)
d$parttime26 <-recode(d$hourswk,"1:29=1;30:87=0;-999=NA")
summary(d$parttime26)
# Age 30
summary(d$econact)
d$parttime2000 <-recode(d$econact,"'F/t paid employee (30+ hrs)'=0;'P/t paid employee (lt 30 hrs)'=1;'F/t self-employed'=0;'P/t self-employed'=1;
			 'Unemployed seeking work'=NA;'F/t education'=NA; 'Government training scheme'=NA; 'Temporarily sick/disabled'=NA;
			 'Permanently sick/disabled'=NA; 'Looking after home/family'=NA; 'Wholly retired'=NA; 'Other (SPECIFY AT NEXT QUESTION)'=NA;
			 'Not answered'=NA")
d$parttime2000[d$parttime30=="Don't Know"] <-NA	
d$parttime30 <-as.numeric(d$parttime2000==1)		 
summary(d$parttime30)
# Age 38
summary(d$b8chour1)
d$parttime38 <-recode(d$b8chour1,"1:29=1;30:80=0;-9:-1=NA")

# Age 42
summary(d$BD9ECACT)
d$parttime2012 <-recode(d$BD9ECACT,"'Refused'=NA;'Not enough information'=NA;'Not applicable'=NA;'Full-time employment'=0;
            'Part-time employment'=1;
						'Full-time self-employment'=0;'Part-time self-employment'=1;'Unemployment'=NA; 'Full-time education'=NA; 
						'Govt scheme for employment training'=NA; 'Temporary sickness/disablity'=NA; 'Permanent sickness/disablity'=NA;
						'Looking after the home/family'=NA;'Retirement'=NA; 'Other'=NA")
d$parttime42 <-as.numeric(d$parttime2012==1)	

#--------------------------------------------- Demographics ---------------------------------------------		

#Sex of Respondent
summary(d$bd7sex)
d$bd7sex[is.na(d$bd7sex)] <-d$sex
d$bd7sex[is.na(d$bd7sex)] <-d$dmsex
d$bd7sex[is.na(d$bd7sex)] <-d$b8cmsex
d$bd7sex[is.na(d$bd7sex)] <-d$B9CMSEX

#Living with partner (married/cohabiting)
summary(d$b7marst2)
d$marital <-recode(d$b7marst2, "'Refusal'=NA; 'Other missing'=NA; 'Not applicable'=NA; 'Single and never married'='Not married'; 'Married - first and only marriage'='Married';
				'Remarried - second or later marriage'='Married';'Legally separated'='Not married';'Divorced'='Not married'; 'Widowed'='Not married'")
d$marital[d$marital=="Don't know"] <-NA
d$married <-as.integer(d$marital=="Married")

# Auxiliary variables

#Age 26
	summary(d$b960322)
	d$marital26 <-recode(d$b960322, "'Inappropriate Answer'=NA; 'Does Not Apply'=NA; 'Not Answered'=NA; 'Single'='Not married'; 'Married - 1st'='Married';
					'Remarried - 2nd+'='Married';'Separated'='Not married';'Divorced'='Not married'; 'Widowed'='Not married'")
	d$married26 <-as.integer(d$marital26=="Married")
	
	#Age 30
	summary(d$ms)
	d$marital30 <-recode(d$ms, "'Not Answered'=NA; 'Single never married'='Not married'; 'Married'='Married';
					'Cohabiting'='Married';'Separated'='Not married';'Divorced'='Not married'; 'Widowed'='Not married'")
	d$married30 <-as.integer(d$marital30=="Married")

	#Age 38
	summary(d$b8ms)
	d$marital38 <-recode(d$b8ms, "'Refusal'=NA; 'Schedule not applicable'=NA; 'Item not applicable'=NA; 'Single and never married'='Not married'; 'Married'='Married';
					'A Civil Partner (legally-recognised)'='Married';'Separated from Spouse'='Not married';'Divorced'='Not married'; 'Widowed'='Not married'")
	d$marital38[d$marital38=="Don't know"] <-NA
  d$marital38[d$marital38=="SPONT: A former Civil Partner"] <-NA
	d$married38 <-as.integer(d$marital38=="Married") 
	
	
	#Age 42
	summary(d$BD9MS)
	d$marital42 <-recode(d$BD9MS, "'Refused'=NA; 'Not applicable'=NA; 'Single and never married or in a CP'='Not married'; 'Married'='Married';
					'A Civil Partner'='Married';'Legally separated'='Not married';'Divorced'='Not married'; 'Widowed'='Not married';'A former Civil Partner'='Not married';
					'A surviving Civil Partner'='Not married'")
	d$marital42[d$marital42=="Don't know"] <-NA
	d$married42 <-as.integer(d$marital42=="Married") 


#One or more children - have included natural, adopted, non-biological (but within household) and children living away from the household
summary(d$bd7nchhh)
d$children <-recode(d$bd7nchhh, "-6=NA;0=0;1:8=1")
sel<-which(d$b7abnu91>=1)
sel1<-which(d$bd7ochhh>=1)
sel2<-which(d$bd7nach>=1)
d$children[sel][is.na(d$children[sel])]<-1
d$children[sel1][is.na(d$children[sel1])]<-1
d$children[sel2][is.na(d$children[sel2])]<-1
summary(d$children)
rm(sel, sel1, sel2)

# Socio-economic class  

summary (d$b7sc)
d$sc34<-NA
d$sc34 <-as.factor(d$b7sc)
d$sc34<-recode(d$sc34,"'-3'=NA;'-1'=NA;'1'='Professional';'2'='II Managerial-technical';
		'3.1'='3.1 Skilled Non-Manual';'3.2'='3.2 Skilled Manual';'4'='IV Partly Skilled';
		'5'='V Unskilled';6='Others'")
summary(d$sc34)


#Age 26
summary(d$rgsc91)
d$sc26<-NA
d$sc26<-as.factor(d$rgsc91)
summary(d$sc26)
d$sc26<-recode(d$sc26, "'0'='Others';'10'='Professional';'20'='II Managerial-technical';'31'='3.1 Skilled Non-Manual';
			'32'='3.2 Skilled Manual';'40'='IV Partly Skilled';'50'='V Unskilled'")
summary(d$sc26)

#Age 30
summary(d$sc)
d$sc30<-NA
d$sc30<-as.factor(d$sc)
d$sc30<-recode(d$sc30, "'1'='Professional';'2'='II Managerial-technical';'3.1'='3.1 Skilled Non-Manual';
		'3.2'='3.2 Skilled Manual';'4'='IV Partly Skilled';'5'='V Unskilled';'6'='Others'")
summary(d$sc30)

#Age 38
summary(d$b8sc)
d$sc38 <-NA
d$sc38 <-as.factor(d$b8sc)
d$sc38 <-recode(d$sc38 ,"'-1'=NA;'0'=NA;'1'='Professional';'2'='II Managerial-technical';
'3.1'='3.1 Skilled Non-Manual';
	'3.2'='3.2 Skilled Manual';'4'='IV Partly Skilled';'5'='V Unskilled';'6'='Others'")
summary(d$sc38)
#Age 42
summary(d$B9CSC)
d$sc42 <-NA
d$sc42 <-as.factor(d$B9CSC)
d$sc42 <-recode(d$sc42 , "'-8'=NA;'-1'=NA;'1'='Professional';'2'='II Managerial-technical';
		'3.1'='3.1 Skilled Non-Manual';'3.2'='3.2 Skilled Manual';'4'='IV Partly Skilled';'5'='V Unskilled';
		'6'='Others'")
summary(d$sc42)
# Age 10 Maths and Reading Scores
d$read10scores <-d$BD3RREAD
d$read10scores[d$BD3RREAD<=0] <-NA 
d$math_score10<-d$BD3MATHS
d$math_score10[d$math_score10<=0] <-NA
d$parentsc <-recode(d$BD3PSOC,"'I professional'='Professionals';'II managerial and Technical'='II Managerial-technical';
		'III non manual'='3.1 Skilled Non-Manual';'III manual'='3.2 Skilled Manual';'IV partly-skilled'='IV Partly Skilled';
		'V unskilled'='V Unskilled';'insufficient/no data'=NA")
summary(d$parentsc)
# Region of Residence (0"London" 1"North East" 2"North West" 3"Yorkshire and Humberside" 4"East Midlands" 5"West Midlands" 6"East of England" 7"South East" 8"South West" 9"Wales" 10"Scotland")
summary(d$b7gor)
d$residence <-recode(d$b7gor, "'Refusal'=NA")

# Auxiliary Variables for residence

# Age 26 (0"London" 1"North East" 2"North West" 3"Yorkshire and Humberside" 4"East Midlands" 5"West Midlands" 6"East of England" 7"South East" 8"South West" 9"Wales" 10"Scotland")
summary(d$BD5GOR)
d$residence26 <-recode(d$BD5GOR, "'Unknown'=NA")

# Age 30 (0"London" 1"North East" 2"North West" 3"Yorkshire and Humberside" 4"East Midlands" 5"West Midlands" 6"East of England" 7"South East" 8"South West" 9"Wales" 10"Scotland")
summary(d$BD6GOR)
d$residence30 <-recode(d$BD6GOR, "'Unknown'=NA")

# Age 38 (0"London" 1"North East" 2"North West" 3"Yorkshire and Humberside" 4"East Midlands" 5"West Midlands" 6"East of England" 7"South East" 8"South West" 9"Wales" 10"Scotland")
summary(d$b8gor)
d$residence38 <-recode(d$b8gor, "'Unknown'=NA")

# Age 42 (0"London" 1"North East" 2"North West" 3"Yorkshire and Humberside" 4"East Midlands" 5"West Midlands" 6"East of England" 7"South East" 8"South West" 9"Wales" 10"Scotland")
summary(d$BD9GOR)
d$residence42 <-recode(d$BD9GOR, "'Not applicable (not resident in UK)'=NA")

#--------------------------------------------- Education ---------------------------------------------
# Degree
d$degreesubj1 <- NA
d$degreesubj1[d$obs30 ==1] <-"None"
d$degreesubj1[d$edqsub66 =="None"] <-"None"
d$degreesubj1[d$edqsub66 =="B A in three dimen desig"] <-"Design" 
d$degreesubj1[d$edqsub66 == "Combined art and English"] <-"Art"
d$degreesubj1[d$edqsub66 =="fine art"] <-"Art" 
d$degreesubj1[d$edqsub66 =="#LINGISTICS"] <- "Languages and Area Studies" 
d$degreesubj1[d$edqsub66 =="1"] <-	"Other" 
d$degreesubj1[d$edqsub66 =="1992"] <-"Other" 
d$degreesubj1[d$edqsub66 =="ACCOUNTANCY"] <-  				"Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="ACCOUNTANCY AND FINANC"] <-  "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="ACCOUNTING"] <-  			"Business, Accounting and Finance"
d$degreesubj1[d$edqsub66 =="ACCOUNTING AND ECONOMICS"] <-  "Business, Accounting and Finance"
d$degreesubj1[d$edqsub66 =="ACCOUNTING AND FINANCE"] <-	"Business, Accounting and Finance"
d$degreesubj1[d$edqsub66 =="ACCOUNTING AND STATISTICS"] <-  	"Business, Accounting and Finance"
d$degreesubj1[d$edqsub66 =="ACCOUNTING/ECONOMICS"] <-  	"Business, Accounting and Finance"
d$degreesubj1[d$edqsub66 =="ACCOUNTS"] <-  		"Business, Accounting and Finance"
d$degreesubj1[d$edqsub66 =="ACCOUNTS AND FINANCE"] <-  	"Business, Accounting and Finance"
d$degreesubj1[d$edqsub66 =="ACOUNTING AND FINANCE"] <- 			"Business, Accounting and Finance"
d$degreesubj1[d$edqsub66 =="ACRCHITECURAL STUDIES"] <-  	"Architecture"	
d$degreesubj1[d$edqsub66 =="AERONAUTICAL AND ASTROLOG"] <-  	"Aerospace Engineering"
d$degreesubj1[d$edqsub66 =="AERONAUTICAL ENGINEERING"] <-    	"Aerospace Engineering" 
d$degreesubj1[d$edqsub66 =="AEROSPACE ENGINEERING"] <-       	"Aerospace Engineering" 
d$degreesubj1[d$edqsub66 =="AGRICULTURAL BUSINESS"] <-     		"Biological and Agricultural Science"
d$degreesubj1[d$edqsub66 =="AGRICULTURE"] <-                	"Biological and Agricultural Science"
d$degreesubj1[d$edqsub66 =="AMERICAN AND COMMONWEALTH"] <-  	"American Studies"
d$degreesubj1[d$edqsub66 =="AMERICAN STUDIES"] <-  		"American Studies" 
d$degreesubj1[d$edqsub66 =="AMERICAN STUDIES, LITERAT"] <-  "American Studies"
d$degreesubj1[d$edqsub66 =="ANATOMICAL SCIENCE"] <-  		"Biological and Agricultural Science"
d$degreesubj1[d$edqsub66 =="ANATOMY AND CELL BIOLOGY"] <-  "Biological and Agricultural Science"
d$degreesubj1[d$edqsub66 =="ANCIENT HISTORY& ARCHAEOL"] <-  "History and Archaeology"
d$degreesubj1[d$edqsub66 =="APP/ CHEM"] <- "Chemistry"
d$degreesubj1[d$edqsub66 =="APPLIED CHEMICAL SCIENCES"] <-  "Chemistry"
d$degreesubj1[d$edqsub66 =="APPLIED CHEMISTRY"] <-  		"Chemistry"
d$degreesubj1[d$edqsub66 =="APPLIED GEOLOGY"] <-  			"Geology" 
d$degreesubj1[d$edqsub66 == "APPLIED LANGUAGE STUDIES"] <- "Languages and Area Studies"
d$degreesubj1[d$edqsub66 =="APPLIED PHYSICS AND ELECT"] <- "Physics" 
d$degreesubj1[d$edqsub66 == "APPLIED PSYCHOLOGY SCIEN"] <- "Psychology"
d$degreesubj1[d$edqsub66 == "APPLIED STATISTICS"] <- "Mathematics and Computing"
d$degreesubj1[d$edqsub66 == "ARCHAEOLOGY"] <- "History and Archaeology"
d$degreesubj1[d$edqsub66 == "ARCHAEOLOGY AND ANTHROPOL"] <- "History and Archaeology"
d$degreesubj1[d$edqsub66 == "ARCHEOLOGY AND HISTORY"] <- "History and Archaeology"
d$degreesubj1[d$edqsub66 =="ARCHITECTURAL VISUALISATI"] <- "Architecture"
d$degreesubj1[d$edqsub66 =="ARCHITECTURE"] <- "Architecture"
d$degreesubj1[d$edqsub66 =="ART"] <- "Art"
d$degreesubj1[d$edqsub66 =="ART & DRAMA WITH QTS"] <- "Art"
d$degreesubj1[d$edqsub66 =="ART AND DESIGN AND Q.T.S"] <- "Art"
d$degreesubj1[d$edqsub66 =="ART AND TEACHING"] <- "Art"
d$degreesubj1[d$edqsub66 =="ART AND THREE DIMENSIONAL"] <- "Art"
d$degreesubj1[d$edqsub66 =="ART EDUCATION STUDIES"] <- "Art"
d$degreesubj1[d$edqsub66 =="ART-TEXTILE DESIGN"] <- "Art" 
d$degreesubj1[d$edqsub66 =="ASTROPHYSICS"] <- "Physics"
d$degreesubj1[d$edqsub66 =="Accountancy"] <- "Business, Accounting and Finance"
d$degreesubj1[d$edqsub66 =="Accountaqncy"] <- "Business, Accounting and Finance"
d$degreesubj1[d$edqsub66 =="Accounting"] <- "Business, Accounting and Finance"
d$degreesubj1[d$edqsub66 =="Accounting & Finance"] <- "Business, Accounting and Finance"
d$degreesubj1[d$edqsub66 =="Accounting & Financial"] <- "Business, Accounting and Finance"
d$degreesubj1[d$edqsub66 =="Accounting and Finance"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="Acting studies"] <- "Performing Arts" 
d$degreesubj1[d$edqsub66 =="Aeronautical Engineering"] <- "Aerospace Engineering"
d$degreesubj1[d$edqsub66 =="Agricultural Engineering"] <- "Aerospace Engineering"
d$degreesubj1[d$edqsub66 =="Agriculture"] <- "Biological and Agricultural Science" 
d$degreesubj1[d$edqsub66 =="Agriculture and Land Mana"] <- "Biological and Agricultural Science"
d$degreesubj1[d$edqsub66 =="Analytical & Applied Chem"] <- "Chemistry"
d$degreesubj1[d$edqsub66 =="Ancient history"] <- "History and Archaeology"
d$degreesubj1[d$edqsub66 =="Applied Biology"] <- "Biological and Agricultural Science"
d$degreesubj1[d$edqsub66 =="Applied Chemistry"] <- "Chemistry"
d$degreesubj1[d$edqsub66 =="Applied chemistry"] <- "Chemistry" 
d$degreesubj1[d$edqsub66 =="Applied social sciences"] <- "Social Science" 
d$degreesubj1[d$edqsub66 =="Applied social studies"] <- "Social Science" 
d$degreesubj1[d$edqsub66 =="Archecture"] <- "Architecture" 
d$degreesubj1[d$edqsub66 =="Architecture"] <- "Architecture" 
d$degreesubj1[d$edqsub66 == "Arts & Design"] <- "Art"
d$degreesubj1[d$edqsub66 =="B A EDUCATION"] <- "Education" 
d$degreesubj1[d$edqsub66 =="B EDUCATION"] <- "Education"
d$degreesubj1[d$edqsub66 =="B ENG"] <- "Engineering" 
d$degreesubj1[d$edqsub66 =="B ENG IN ENGINEERING"] <- "Engineering" 
d$degreesubj1[d$edqsub66 == "B ENG IN MATERIALS AND"] <- "Engineering"
d$degreesubj1[d$edqsub66 =="B S C NURSING"] <- "Nursing" 
d$degreesubj1[d$edqsub66 =="B. OF MECHANICAL ENGINEER"] <- "Mechanical Engineering" 
d$degreesubj1[d$edqsub66 == "B.A. in Education."] <- "Education"
d$degreesubj1[d$edqsub66 == "B.ED."] <- "Education"
d$degreesubj1[d$edqsub66 == "B.ED.SPORTS STUDIES"] <- "Sport Science"
d$degreesubj1[d$edqsub66 == "B.Ed. (HONS)"] <- "Education" 
d$degreesubj1[d$edqsub66 =="B.Med. Science"] <- "Other health" 
d$degreesubj1[d$edqsub66 =="B.SC. ANTOMY/CELL BIOLOGY"] <- "Biological and Agricultural Science" 
d$degreesubj1[d$edqsub66 =="B.Sc in computer science"] <- "Mathematics and Computing" 
d$degreesubj1[d$edqsub66 =="BA BUSINESS ECONOMICS / M"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="BA BUSINESS MANAGEMENT"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="BA ED Hist Geog"] <- "History and Archaeology" 
d$degreesubj1[d$edqsub66 =="BA Hons Graphic design"] <- "Design" 
d$degreesubj1[d$edqsub66 =="BA IN BUSINESS STUD"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="BA IN QTS HOINS IN PHYSIC"] <- "Physics" 
d$degreesubj1[d$edqsub66 =="BA hons in english, with"] <- "English" 
d$degreesubj1[d$edqsub66 =="BA hons in psychology"] <- "Psychology" 
d$degreesubj1[d$edqsub66 =="BA in medicine"] <- "Medicine and Dentistry" 
d$degreesubj1[d$edqsub66 =="BACHELOR OF EDUCATION"] <- "Education" 
d$degreesubj1[d$edqsub66 =="BANKING, INSURANCE AND FI"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="BATCHELOR OF EDUCATION"] <- "Education"
d$degreesubj1[d$edqsub66 =="BATCHELOR OF ENGINEERING"] <- "Engineering" 
d$degreesubj1[d$edqsub66 =="BChD"] <- "Medicine and Dentistry" 
d$degreesubj1[d$edqsub66 =="BDS - DENTISTRY"] <- "Medicine and Dentistry" 
d$degreesubj1[d$edqsub66 =="BEHAVIOURAL SCIENCE"] <- "Psychology" 
d$degreesubj1[d$edqsub66 =="BI0CHEMISTRY"] <- "Biological and Agricultural Science" 
d$degreesubj1[d$edqsub66 =="BIO CHEMISTRY"] <- "Biological and Agricultural Science" 
d$degreesubj1[d$edqsub66 =="BIO CHEMSTRY"] <- "Biological and Agricultural Science" 
d$degreesubj1[d$edqsub66 =="BIOCHEMISTRY"] <- "Biological and Agricultural Science" 
d$degreesubj1[d$edqsub66 =="BIOLOGICAL SCIENCES"] <- "Biological and Agricultural Science" 
d$degreesubj1[d$edqsub66 =="BIOLOGICAL WITH HEALTH SC"] <- "Biological and Agricultural Science" 
d$degreesubj1[d$edqsub66 =="BIOLOGY"] <- "Biological and Agricultural Science"  
d$degreesubj1[d$edqsub66 =="BIOLOGY AND EDUCATION"] <- "Biological and Agricultural Science" 
d$degreesubj1[d$edqsub66 =="BIOLOGY AND GEOGRAPHY"] <- "Biological and Agricultural Science" 
d$degreesubj1[d$edqsub66 =="BIOLOGY AND GEOLOGY"] <- "Biological and Agricultural Science" 
d$degreesubj1[d$edqsub66 =="BIOLOGY AND STATISTICS"] <- "Biological and Agricultural Science" 
d$degreesubj1[d$edqsub66 =="BIOMEDICAL SCIENCE"] <- "Other health" 
d$degreesubj1[d$edqsub66 =="BRITISH ECONOMIC AND SOCI"] <- "Social Science" 
d$degreesubj1[d$edqsub66 =="BSC ASTRONOMY AND ASTRO P"] <- "Physics" 
d$degreesubj1[d$edqsub66 =="BSC HONOURS QUANTITY SURV"] <- "Construction Engineering" 
d$degreesubj1[d$edqsub66 =="BSC IN MATHS AND COMPUTIN"] <- "Mathematics and Computing" 
d$degreesubj1[d$edqsub66 =="BSC IN PHYSICS/ASTRONOMY"] <- "Physics" 
d$degreesubj1[d$edqsub66 =="BSC SPORTS SCIENCE"] <- "Sport Science" 
d$degreesubj1[d$edqsub66 =="BSc in Speech pathology a"] <- "Other health" 
d$degreesubj1[d$edqsub66 =="BSc. speech & therapy"] <- "Other health" 
d$degreesubj1[d$edqsub66 =="BUILDING ENGINEERING"] <- "Construction Engineering" 
d$degreesubj1[d$edqsub66 =="BUILDING SERVICES ENGINEE"] <- "Construction Engineering" 
d$degreesubj1[d$edqsub66 =="BUILDING SURVEYING"] <- "Construction Engineering" 
d$degreesubj1[d$edqsub66 =="BUISNESS STUDIES"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="BUISNESS STUDIES AND FINA"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="BUSINES AND FINANCE"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="BUSINESS"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="BUSINESS ADMINISTRATION"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="BUSINESS ADMINISTRATION A"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="BUSINESS ADMINISTRRATION"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="BUSINESS AND COMPUTING"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="BUSINESS AND ECONOMICS WI"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="BUSINESS AND INFORMATION"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="BUSINESS AND MARKETING"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="BUSINESS AND SOCIAL STUDI"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="BUSINESS COMPUTING"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="BUSINESS COMPUTING SYSTEM"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="BUSINESS COMPUTING WITH F"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="BUSINESS ECONMICS"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="BUSINESS EDUCATION"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="BUSINESS INF AND MANAGEME"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="BUSINESS INFORMATION SYST"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="BUSINESS STUDIES"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="BUSINESS STUDIES AND PSYC"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="BUSIUNEES STUDIES"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="Bachelor of Education"] <- "Education" 
d$degreesubj1[d$edqsub66 =="Banking,Insurance and Fin"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="Batch of education"] <- "Education"
d$degreesubj1[d$edqsub66 =="Batchelor of Medicine"] <- "Medicine and Dentistry" 
d$degreesubj1[d$edqsub66 =="Bi medical sciences"] <- "Other health" 
d$degreesubj1[d$edqsub66 =="Bio chemistry"] <- "Biological and Agricultural Science" 
d$degreesubj1[d$edqsub66 =="Bio physics and molecular"] <- "Biological and Agricultural Science" 
d$degreesubj1[d$edqsub66 =="Biochemistry"] <- "Biological and Agricultural Science" 
d$degreesubj1[d$edqsub66 =="Biological & medicinal ch"] <- "Biological and Agricultural Science" 
d$degreesubj1[d$edqsub66 =="Biological SCiences"] <- "Biological and Agricultural Science" 
d$degreesubj1[d$edqsub66 =="Biological Sciences"] <- "Biological and Agricultural Science" 
d$degreesubj1[d$edqsub66 =="Biologicalm Sciences"] <- "Biological and Agricultural Science" 
d$degreesubj1[d$edqsub66 =="Biology"] <- "Biological and Agricultural Science" 
d$degreesubj1[d$edqsub66 =="Bsc Technology and busine"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="Building Environmental"] <- "Construction Engineering"
d$degreesubj1[d$edqsub66 =="Building Surveying"] <- "Construction Engineering"
d$degreesubj1[d$edqsub66 =="Business & Computer Studi"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="Business Admin and French"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="Business Administration w"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="Business Administration/G"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="Business Adminstration"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="Business Economics And Pm"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="Business Economics and Ac"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="Business Economics and Fi"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="Business Law"] <- "law" 
d$degreesubj1[d$edqsub66 =="Business Management"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="Business Studies"] <- "Business, Accounting and Finance"        
d$degreesubj1[d$edqsub66 =="Business and Finance"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="Business and finance"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="Business information syst"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="Business studies"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="Business studies and mark"] <- "Business, Accounting and Finance" 
d$degreesubj1[d$edqsub66 =="CHEMISTRY AND BUSINESS AD"] <- "Chemistry"                   
d$degreesubj1[d$edqsub66 =="CIVIL ENGINEERING"] <- "Civil Engineering"                           
d$degreesubj1[d$edqsub66 =="CLASSICAL CIVILISATION"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="CLOTHING MANUFACTURE ETC"] <- "Design"                         
d$degreesubj1[d$edqsub66 =="COMBINE ARTS"] <- "Arts and Humanities"                          
d$degreesubj1[d$edqsub66 =="COMBINED ARTS, PSYCOLOGY,"] <- "Social Science"                            
d$degreesubj1[d$edqsub66 =="COMBINED ENGLISH AND ART"] <-  "Arts and Humanities"                       
d$degreesubj1[d$edqsub66 =="COMMUNITY NURSING"] <- "Nursing"                          
d$degreesubj1[d$edqsub66 =="COMMUNITY STUDIES"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="COMPUTER AIDED ENGINEEERI"] <- "Engineering"                          
d$degreesubj1[d$edqsub66 =="COMPUTER SCIENCE"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 =="COMPUTERING"] <- "Mathematics and Computing"                         
d$degreesubj1[d$edqsub66 == "COMPUTING"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 =="COMPUTING AND BUSINESS"] <- "Mathematics and Computing" 
d$degreesubj1[d$edqsub66 =="COMPUTING SCIENCE"] <- "Mathematics and Computing"                     
d$degreesubj1[d$edqsub66 =="COMPUTOR SCIENCE"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 =="CONSTRUCTION MANAGEMENT"] <- "Construction Engineering"                          
d$degreesubj1[d$edqsub66 =="CONSUMER SCIENCES"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="CONTEMPORARY MEDIA PRACTI"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="CONTROL INSTRUMENTATION A"] <- "Electronic and Electrical Engineering"                          
d$degreesubj1[d$edqsub66 =="CORPORATE COMMUNICATIONS"] <-  "Other"
d$degreesubj1[d$edqsub66 =="CEVIL ENG"] <- "Civil Engineering" 
d$degreesubj1[d$edqsub66 =="CHEM"] <- "Chemistry" 
d$degreesubj1[d$edqsub66 =="CHEMICAL BIOPROCESS ENG"] <- "Chemical Engineering"
d$degreesubj1[d$edqsub66 =="CHEMICHAL AND PHARMACEUTI"] <- "Chemistry" 
d$degreesubj1[d$edqsub66 =="CHEMISTRY"] <- "Chemistry" 
d$degreesubj1[d$edqsub66 =="CULTURAL STUDIES"] <- "Cultural Studies"   
d$degreesubj1[d$edqsub66 =="Chemical Physics"] <- "Physics" 
d$degreesubj1[d$edqsub66 =="Chemical engineeering"] <- "Chemical Engineering" 
d$degreesubj1[d$edqsub66 =="Chemical engineering"] <- "Chemical Engineering"  
d$degreesubj1[d$edqsub66 =="Chemistry"] <-  "Chemistry" 
d$degreesubj1[d$edqsub66 =="Chemistry applied"] <- "Chemistry" 
d$degreesubj1[d$edqsub66 =="Chemistry with business s"] <- "Chemistry" 
d$degreesubj1[d$edqsub66 =="Chemistry with polymer sc"] <- "Chemistry" 
d$degreesubj1[d$edqsub66 =="Chemistry."] <- "Chemistry"    
d$degreesubj1[d$edqsub66 =="Civil Engineering"] <- "Civil Engineering" 
d$degreesubj1[d$edqsub66 =="Civil and Transportation"] <- "Other" 
d$degreesubj1[d$edqsub66 =="Civil engineering"] <- "Civil Engineering" 
d$degreesubj1[d$edqsub66 =="Classical Civilisation"] <- "History and Archaeology" 
d$degreesubj1[d$edqsub66 =="Clothing Management and T"] <- "Design" 
d$degreesubj1[d$edqsub66 =="Combined English Lit / Hi"] <- "English" 
d$degreesubj1[d$edqsub66 =="Combined German and Psych"] <- "Languages and Area Studies" 
d$degreesubj1[d$edqsub66 =="Combined Health Studies"] <- "Other health" 
d$degreesubj1[d$edqsub66 =="Combined Studies"] <- "Other" 
d$degreesubj1[d$edqsub66 =="Combined studies"] <- "Other" 
d$degreesubj1[d$edqsub66 =="Commu7nication Studies"] <- "Other" 
d$degreesubj1[d$edqsub66 =="Communication studies"] <- "Other" 
d$degreesubj1[d$edqsub66 =="Community Health Nursing"] <- "Other health" 
d$degreesubj1[d$edqsub66 =="Community studies"] <- "Other" 
d$degreesubj1[d$edqsub66 =="Computer Science"] <- "Mathematics and Computing" 
d$degreesubj1[d$edqsub66 =="Computer Studies"] <- "Mathematics and Computing" 
d$degreesubj1[d$edqsub66 =="Computer Studies."] <- "Mathematics and Computing"
d$degreesubj1[d$edqsub66 =="Computer animation and vi"] <- "Design"           
d$degreesubj1[d$edqsub66 =="Computer science"] <- "Mathematics and Computing" 
d$degreesubj1[d$edqsub66 =="Computer science/"] <- "Mathematics and Computing" 
d$degreesubj1[d$edqsub66 =="Computer sciences"] <- "Mathematics and Computing" 
d$degreesubj1[d$edqsub66 =="Computer studies"] <- "Mathematics and Computing" 
d$degreesubj1[d$edqsub66 =="Computer systems engineer"] <-"Electronic and Electrical Engineering"
d$degreesubj1[d$edqsub66 =="Computing"] <- "Mathematics and Computing" 
d$degreesubj1[d$edqsub66 =="Computing and Electronic"] <- "Mathematics and Computing" 
d$degreesubj1[d$edqsub66 =="Computing science"] <- "Mathematics and Computing" 
d$degreesubj1[d$edqsub66 =="Construcion Managemnt qnd"] <- "Construction Engineering" 
d$degreesubj1[d$edqsub66 =="Construction Management"] <- "Construction Engineering" 
d$degreesubj1[d$edqsub66 =="Construction management"] <- "Construction Engineering"
d$degreesubj1[d$edqsub66 =="Construction managenent"] <- "Construction Engineering"
d$degreesubj1[d$edqsub66 =="Countryside Management"] <- "Other" 
d$degreesubj1[d$edqsub66 =="Criminal justice,."] <- "Criminology"
d$degreesubj1[d$edqsub66 =="DANCE STUDIES"] <- "Performing Arts"
d$degreesubj1[d$edqsub66 == "DESIGN .ILLUSTRATION"] <- "Design"
d$degreesubj1[d$edqsub66 =="DESIGN AND TECHNOLOIGY ED"] <- "Education" 
d$degreesubj1[d$edqsub66 =="DEVEVOPMENTAL BIOLAGY"] <- "Biological and Agricultural Science"
d$degreesubj1[d$edqsub66 =="DIAGNOSTIC RADIOGRAPHY"] <- "Other health" 
d$degreesubj1[d$edqsub66 =="DRAMA"] <- "Performing Arts" 
d$degreesubj1[d$edqsub66 =="DRAMA AND EDUCATION"] <- "Performing Arts" 
d$degreesubj1[d$edqsub66 =="DUALHONST"] <- "Other" 
d$degreesubj1[d$edqsub66 =="Dance & Drama"] <- "Performing Arts" 
d$degreesubj1[d$edqsub66 =="Dentistry"] <- "Medicine and Dentistry" 
d$degreesubj1[d$edqsub66 =="Design & Media Management"] <- "Design" 
d$degreesubj1[d$edqsub66 =="Dev. studies & Spanish"] <- "Social Science"        
d$degreesubj1[d$edqsub66 =="Drama"] <- "Performing Arts" 
d$degreesubj1[d$edqsub66 =="Drama and film"] <- "Performing Arts" 
d$degreesubj1[d$edqsub66 =="EARLY CHILDHOOD B.A"] <- "Other" 
d$degreesubj1[d$edqsub66 =="ECOLOGY"] <- "Biological and Agricultural Science" 
d$degreesubj1[d$edqsub66 =="ECCONOMICS WITH ECCONOMIC"] <- "Economics" 
d$degreesubj1[d$edqsub66 =="ECONOMICS"] <- "Economics"          
d$degreesubj1[d$edqsub66 =="ECONOMICS AND ACCOUNTANCY"] <- "Economics" 
d$degreesubj1[d$edqsub66 =="ECONOMICS AND ACCOUNTS "] <- "Economics" 
d$degreesubj1[d$edqsub66 =="ECONOMICS WITH ACC & FINA"] <- "Economics" 
d$degreesubj1[d$edqsub66 =="EDUCATION"] <- "Education"    
d$degreesubj1[d$edqsub66 =="EDUCATION & BUSINESS STUD"] <- "Education"
d$degreesubj1[d$edqsub66 =="EDUCATION AND ART"] <- "Education"
d$degreesubj1[d$edqsub66 =="EDUCATION GEOGRAPHY"] <- "Education"
d$degreesubj1[d$edqsub66 =="EDUCATION IN ART AND"] <- "Education"    
d$degreesubj1[d$edqsub66 =="EDUCATION WITH ENGLISH AN"] <- "Education"      
d$degreesubj1[d$edqsub66 =="EDUCATION WITH GEOGRAPHY"] <-  "Education"        
d$degreesubj1[d$edqsub66 =="ELEC SYSTM&CONTRL ENG"] <- "Electronic and Electrical Engineering"           
d$degreesubj1[d$edqsub66 =="ELECTRICAL AND ELECTRONIC"] <- "Electronic and Electrical Engineering"         
d$degreesubj1[d$edqsub66 =="ELECTRICAL AND ELOCTRONIC"] <- "Electronic and Electrical Engineering"         
d$degreesubj1[d$edqsub66 =="ELECTRICAL ENGINEERING"] <-  "Electronic and Electrical Engineering"       
d$degreesubj1[d$edqsub66 =="ELECTRICAL ENIGINEER"] <-  "Electronic and Electrical Engineering"         
d$degreesubj1[d$edqsub66 =="ELECTRICAL/ELECTRICAL ENG"] <- "Electronic and Electrical Engineering"          
d$degreesubj1[d$edqsub66 =="ELECTRO-ACOUSTICS"] <-  "Electronic and Electrical Engineering"         
d$degreesubj1[d$edqsub66 =="ELECTRONIC AND ELECTRICAL"] <-  "Electronic and Electrical Engineering"     
d$degreesubj1[d$edqsub66 =="ELECTRONIC ENGINEERING"] <-  "Electronic and Electrical Engineering" 
d$degreesubj1[d$edqsub66 == "ELECTRONIC IMAGING AND"] <- "Electronic and Electrical Engineering"                         
d$degreesubj1[d$edqsub66 =="ELECTRONICS"] <- "Electronic and Electrical Engineering"                          
d$degreesubj1[d$edqsub66 =="ELECTRONICS ENGINEERING"] <- "Electronic and Electrical Engineering"                           
d$degreesubj1[d$edqsub66 =="Engineering with business"] <- "Electronic and Electrical Engineering" 
d$degreesubj1[d$edqsub66 =="Engineering Technology"] <- "Electronic and Electrical Engineering" 
d$degreesubj1[d$edqsub66 =="Engineering"] <- "Engineering"                                                    
d$degreesubj1[d$edqsub66 =="English"] <- "English" 
d$degreesubj1[d$edqsub66 =="ELECTRONICS/-"] <- "Electronic and Electrical Engineering"                           
d$degreesubj1[d$edqsub66 =="ENGINEERING"] <- "Engineering"                         
d$degreesubj1[d$edqsub66 =="ENGINEERING & SURVEYING"] <- "Engineering"                          
d$degreesubj1[d$edqsub66 =="ENGINEERING AND BUSINESS"] <- "Engineering"                          
d$degreesubj1[d$edqsub66 =="ENGINEERING ELECTRONICS"] <- "Engineering"                          
d$degreesubj1[d$edqsub66 =="ENGINEERING MANUFACTURING"] <- "Engineering"                     
d$degreesubj1[d$edqsub66 =="ENGINEERING PHYSICS"] <- "Engineering"                          
d$degreesubj1[d$edqsub66 =="ENGINEERING, MANUFACTURIN"] <- "Engineering"                      
d$degreesubj1[d$edqsub66 =="ENGINERRING"] <- "Engineering"                          
d$degreesubj1[d$edqsub66 =="ENGLISH"] <- "English"                          
d$degreesubj1[d$edqsub66 =="ENGLISH & PHYSICAL EDUCAT"] <- "English"                         
d$degreesubj1[d$edqsub66 =="ENGLISH AND CLASSICS"] <- "English"                          
d$degreesubj1[d$edqsub66 =="ENGLISH LANGUAGE AND LITE"] <- "English"                         
d$degreesubj1[d$edqsub66 =="ENGLISH LIT"] <- "English"                          
d$degreesubj1[d$edqsub66 =="ENGLISH LITERATURA AND LA"] <- "English"                         
d$degreesubj1[d$edqsub66 =="ENGLISH LITERATURE"] <- "English"                          
d$degreesubj1[d$edqsub66 =="ENGLISH LITERATURE AND DR"] <- "English"                         
d$degreesubj1[d$edqsub66 =="ENGLISH WITH HISTORY"] <- "English"                          
d$degreesubj1[d$edqsub66 =="ENGLISH,HISTORY AND FRENC"] <- "English"                          
d$degreesubj1[d$edqsub66 =="ENGLISH/MEDIA CULTURAL ST"] <- "English"                         
d$degreesubj1[d$edqsub66 =="ENV STUDIES"] <- "Environmental Science"                          
d$degreesubj1[d$edqsub66 =="ENVIROMENTAL SCIENCE"] <- "Environmental Science"                           
d$degreesubj1[d$edqsub66 =="ENVIRONMENTAL MANAGEMENT"] <- "Environmental Science"                          
d$degreesubj1[d$edqsub66 =="ENVIRONMENTAL SCIENCE"] <- "Environmental Science"                         
d$degreesubj1[d$edqsub66 =="ESTATE MANAGEMENT"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="EUROPEAN BUSINESS ADMINIS"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="EUROPEAN ECONOMICS"] <- "Economics"                         
d$degreesubj1[d$edqsub66 =="EUROPEAN LANGUAGE"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="EUROPEAN LANGUAGES AND IN"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="EUROPEAN STUDIES"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="Economics"] <- "Economics"                         
d$degreesubj1[d$edqsub66 =="Economics & Social Scienc"] <- "Economics"                          
d$degreesubj1[d$edqsub66 =="Economics and Business Fi"] <- "Economics"                          
d$degreesubj1[d$edqsub66 =="Economics and Geography"] <- "Economics"                          
d$degreesubj1[d$edqsub66 =="Economics and Politics"] <- "Economics"                          
d$degreesubj1[d$edqsub66 =="Economics and Public Poli"] <- "Economics"                           
d$degreesubj1[d$edqsub66 =="Economics and sociology"] <- "Economics"                          
d$degreesubj1[d$edqsub66 =="Education"] <- "Education"                         
d$degreesubj1[d$edqsub66 =="Elec'cal/Elec'ic Eng'ing"] <- "Electronic and Electrical Engineering"                          
d$degreesubj1[d$edqsub66 =="Elect/Comp Enginering"] <- "Electronic and Electrical Engineering"                          
d$degreesubj1[d$edqsub66 =="Electric/Electronic Engin"] <- "Electronic and Electrical Engineering"                          
d$degreesubj1[d$edqsub66 =="Electrical & information"] <- "Electronic and Electrical Engineering"                          
d$degreesubj1[d$edqsub66 =="Electrical Engineering"] <- "Electronic and Electrical Engineering"                         
d$degreesubj1[d$edqsub66 =="Electrical and Electronic"] <- "Electronic and Electrical Engineering"                          
d$degreesubj1[d$edqsub66 =="Electrical and electronic"] <- "Electronic and Electrical Engineering"                          
d$degreesubj1[d$edqsub66 =="Electroaccoustics"] <- "Electronic and Electrical Engineering"                          
d$degreesubj1[d$edqsub66 =="Electronic and electrical"] <-  "Electronic and Electrical Engineering"                         
d$degreesubj1[d$edqsub66 =="Eng Lit"] <- "English" 
d$degreesubj1[d$edqsub66 =="English & politics"] <- "English"                          
d$degreesubj1[d$edqsub66 =="English German"] <- "English"                          
d$degreesubj1[d$edqsub66 =="English Lit"] <- "English"                          
d$degreesubj1[d$edqsub66 =="English Literature"] <- "English"                         
d$degreesubj1[d$edqsub66 =="English Literature/Lang"] <-  "English"                         
d$degreesubj1[d$edqsub66 =="English and Education"] <- "English"                           
d$degreesubj1[d$edqsub66 =="English and Politics"] <- "English"                          
d$degreesubj1[d$edqsub66 =="English and education"] <- "English"                                              
d$degreesubj1[d$edqsub66 =="English studies"] <- "English"                        
d$degreesubj1[d$edqsub66 =="English studies -"] <- "English"                          
d$degreesubj1[d$edqsub66 =="English+Sociology"] <- "English"                          
d$degreesubj1[d$edqsub66 =="Enviromental Sciences"] <- "Environmental Science"                          
d$degreesubj1[d$edqsub66 =="Enviromental Technology"] <- "Environmental Science"                          
d$degreesubj1[d$edqsub66 =="Environmental Earth Scien"] <- "Environmental Science"                          
d$degreesubj1[d$edqsub66 =="Environmental Science"] <- "Environmental Science"                          
d$degreesubj1[d$edqsub66 =="Environmental Sciences"] <- "Environmental Science"                         
d$degreesubj1[d$edqsub66 =="Environmental science"] <-  "Environmental Science"                         
d$degreesubj1[d$edqsub66 =="Estate management"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="FASHION AND TEXTILES"] <- "Design"                            
d$degreesubj1[d$edqsub66 =="FASHION DESIGN AND MANAFA"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="FASHION DESIGN BA HONS"] <- "Design"                       
d$degreesubj1[d$edqsub66 =="FASION & TEXTILES"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="FINANCIAL SERVICES"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="FINE ART"] <- "Art"                          
d$degreesubj1[d$edqsub66 =="FINE ART & SCULPTURE"] <- "Art"                          
d$degreesubj1[d$edqsub66 =="FOOD SCIENCE ECONOMICS AD"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="FRENCH /LINGUISTICS"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="FRENCH AND GERMAN"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="FRENCH AND GERMAN WITH BU"] <- "Languages and Area Studies"                         
d$degreesubj1[d$edqsub66 =="FRENCH AND ITALIAN"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="FRENCH AND SPANISH"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="FRENCH STUDIES"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="Fashion"] <-  "Design"                         
d$degreesubj1[d$edqsub66 =="Fashion Design and Textil"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="Fashion Textiles"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="Fashion and knitwear Desi"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="Film , Radio and Televisi"] <- "Performing Arts"                          
d$degreesubj1[d$edqsub66 =="Film and Literature"] <- "Performing Arts"                          
d$degreesubj1[d$edqsub66 =="Finance"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="Financial services"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="Fine Art"] <- "Art"                          
d$degreesubj1[d$edqsub66 =="Fine Art  BA"] <-  "Art"                         
d$degreesubj1[d$edqsub66 =="Fine art"] <- "Art"                          
d$degreesubj1[d$edqsub66 =="Food and catering managem"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="French"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="French Russian and Busine"] <- "Languages and Area Studies"                         
d$degreesubj1[d$edqsub66 =="French and Linguistics"] <- "Languages and Area Studies"                         
d$degreesubj1[d$edqsub66 =="French and Swedish double"] <- "Languages and Area Studies"                         
d$degreesubj1[d$edqsub66 =="French with Sport"] <- "Languages and Area Studies"                        
d$degreesubj1[d$edqsub66 =="French/Drama"] <- "Languages and Area Studies"                         
d$degreesubj1[d$edqsub66 =="French/German / "] <- "Languages and Area Studies"                        
d$degreesubj1[d$edqsub66 =="GAELIC/FRENCH"] <- "Languages and Area Studies"                         
d$degreesubj1[d$edqsub66 =="GEOGRAPHICAL INFORMATION"] <- "Geography"                          
d$degreesubj1[d$edqsub66 == "GEOGRAPHY"] <- "Geography"                         
d$degreesubj1[d$edqsub66 == "GEOGRAPHY AND ARCHEOLOGY"] <- "Geography"                         
d$degreesubj1[d$edqsub66 == "GEOGRAPHY AND PSYCHOLOGY"] <- "Geography"                        
d$degreesubj1[d$edqsub66 == "GEOGRAPHY WITH PE AND SPO"] <- "Geography"                         
d$degreesubj1[d$edqsub66 == "GEOGRAPHY/ART AND DESIGN"] <-  "Geography"                        
d$degreesubj1[d$edqsub66 == "GEOGRAPY"] <-  "Geography"                        
d$degreesubj1[d$edqsub66 == "GERMAN"] <- "Languages and Area Studies"                         
d$degreesubj1[d$edqsub66 == "GERMAN AND HISTORY"] <- "Languages and Area Studies"                         
d$degreesubj1[d$edqsub66 == "GERMAN WITH HISTORY"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 == "GERMAN/SPANISH /"] <- "Languages and Area Studies"                         
d$degreesubj1[d$edqsub66 =="GOEGRAPHY"] <- "Geography"                         
d$degreesubj1[d$edqsub66 =="GRAPHIC DESIGN"] <- "Design"                           
d$degreesubj1[d$edqsub66 =="GRAPHIC DESIGN ANIMATION"] <- "Design"                          
d$degreesubj1[d$edqsub66 == "GRAPHIC INFORMATION DESIG"] <- "Design"                          
d$degreesubj1[d$edqsub66 == "Genetics"] <- "Biological and Agricultural Science"                         
d$degreesubj1[d$edqsub66 =="Geography"] <- "Geography"                           
d$degreesubj1[d$edqsub66 =="Geography & Education"] <- "Geography"                           
d$degreesubj1[d$edqsub66 =="Geography & Geology"] <- "Geography"                           
d$degreesubj1[d$edqsub66 =="Geography BSc"] <- "Geography" 
d$degreesubj1[d$edqsub66 =="Geography/Management"] <- "Geography"                           
d$degreesubj1[d$edqsub66 =="Geology"] <- "Geology"                          
d$degreesubj1[d$edqsub66 =="German"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="German & European Studies"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="German and russian studie"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="Graduate Diploma of Music"] <- "Music"                          
d$degreesubj1[d$edqsub66 =="Graphic Design"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="Graphic Design & Illustra"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="Graphic design"] <- "Design" 
d$degreesubj1[d$edqsub66 =="Graphic design and advert"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="Graphic design"] <- "Design"                         
d$degreesubj1[d$edqsub66 =="Graphic information desig"] <-                          
d$degreesubj1[d$edqsub66 =="Greek"] <- "Languages and Area Studies"                         
d$degreesubj1[d$edqsub66 =="HEALTH AND COMMUNITY STGU"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="HEALTH SCIENCE"] <- "Other health"                          
d$degreesubj1[d$edqsub66 =="HEALTH STUDIES"] <- "Other health"                          
d$degreesubj1[d$edqsub66 == "HISPANIC STUDIES/POLITICS"] <-  "Languages and Area Studies"                        
d$degreesubj1[d$edqsub66 =="HISTORICAL STUDIES"] <-  "History and Archaeology"                         
d$degreesubj1[d$edqsub66 =="HISTORY"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="HISTORY & ARCHAEOLOGY"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="HISTORY AND CLASSICS"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="HISTORY AND ECONOOMICS"] <- "History and Archaeology"                           
d$degreesubj1[d$edqsub66 =="HISTORY AND EDUCATION"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="HISTORY AND ENGLISH LIT"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="HISTORY AND POLITICS"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="HISTORY OF ART"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="HISTORY OF ART AND ARCHIT"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="HISTORY OF DESIGN"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="HISTORY/ENGLISH"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="HNC IN RETAIL EXHIBITION"] <- "None"                           
d$degreesubj1[d$edqsub66 =="HOME ECONOMICS AND RESOUR"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="  HOUSING AND DEVELOPMENT"] <- "Other"                         
d$degreesubj1[d$edqsub66 =="HOUSING MANAGEMENT AND DE"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="HOtel and Catering Manage"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="HUMANITIES"] <- "Arts and Humanities"                          
d$degreesubj1[d$edqsub66 =="HUMANITIES-ENGLISH LITERA"] <- "Arts and Humanities"                         
d$degreesubj1[d$edqsub66 =="Health"] <- "Other health"                          
d$degreesubj1[d$edqsub66 =="Health Studies"] <- "Other health"                           
d$degreesubj1[d$edqsub66 =="Health studies"] <- "Other health"                         
d$degreesubj1[d$edqsub66 =="Historical&Political stud"] <- "Political Science"                          
d$degreesubj1[d$edqsub66 =="History"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="History and Politics"] <- "Political Science"                          
d$degreesubj1[d$edqsub66 =="History and politics"] <- "Political Science"                           
d$degreesubj1[d$edqsub66 =="History "] <- "History and Archaeology"                         
d$degreesubj1[d$edqsub66 =="History/English"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="History/Media Studies"] <- "History and Archaeology"                           
d$degreesubj1[d$edqsub66 =="Hospitaliy Management"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="Hotel & catering manageme"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="Hotel and Catering Manage"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="Hotel and Catering and"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="Hotel and catering"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="Humanities"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="IT"] <- "Other"                        
d$degreesubj1[d$edqsub66 =="INFO TECHNOLOGY"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="INFORMATION & LIBRARY STU"] <- "Other"                           
d$degreesubj1[d$edqsub66 =="INFORMATION SYSTEMS"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="INFORMATION SYSTEMS ENGIN"] <- "Engineering"                          
d$degreesubj1[d$edqsub66 =="INFORMATION TECHNOLOGY"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="INTERNATIONAL BUSINESS AN"] <- "Business, Accounting and Finance"                         
d$degreesubj1[d$edqsub66 =="INTERNATIONAL RELATIONS"] <- "Political Science"                          
d$degreesubj1[d$edqsub66 =="I.T."] <- "Other"                          
d$degreesubj1[d$edqsub66 =="Illustration"] <- "Design"                           
d$degreesubj1[d$edqsub66 =="Industrial Design"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="Industrial design"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="Industrial economics"] <- "Economics"                          
d$degreesubj1[d$edqsub66 =="Information Systems"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="Information Technoloigy"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="Instumentation and contro"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="Integrated Studies"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="Interior design "] <- "Design"                         
d$degreesubj1[d$edqsub66 =="Internantional disaster e"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="JOINT WELSH AND SOCIAL PO"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="LAND ECONOMY"] <- "Economics"                           
d$degreesubj1[d$edqsub66 =="LAND ECONOMY/ LAW"] <- "Economics"                          
d$degreesubj1[d$edqsub66 =="LANDMANAGEMENT"] <-  "Other"                         
d$degreesubj1[d$edqsub66 =="LANDSCAPE ARCHITECTURE"] <- "Architecture"                          
d$degreesubj1[d$edqsub66 =="LANDSCAPE ARTICECTURE"] <- "Architecture"                          
d$degreesubj1[d$edqsub66 == "LANGUAGES"] <- "Languages and Area Studies"                         
d$degreesubj1[d$edqsub66 =="LAW"] <- "law"                         
d$degreesubj1[d$edqsub66 =="LAW AND INTERNATIONAL POL"] <- "law"                          
d$degreesubj1[d$edqsub66 == "LAW WITH MARKETING"] <- "law"                         
d$degreesubj1[d$edqsub66 =="LAW/ENGLISH LLB"] <- "law"                          
d$degreesubj1[d$edqsub66 =="LEISURE MANAGEMENT"] <- "Other"                           
d$degreesubj1[d$edqsub66 == "LIBRARIANSHIP AND GEOGRAP"] <- "Other"                         
d$degreesubj1[d$edqsub66 =="LINGUISTICS"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="LITERAE HUMANIORES"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="LLB"] <- "law"                          
d$degreesubj1[d$edqsub66 == "Land Economy"] <- "Other"                         
d$degreesubj1[d$edqsub66 == "Land Management"] <- "Other"                         
d$degreesubj1[d$edqsub66 == "Land economy"] <- "Other"                        
d$degreesubj1[d$edqsub66 =="Landscape Architecture"] <- "Architecture"                          
d$degreesubj1[d$edqsub66 == "Languages & IT"] <- "Languages and Area Studies"                         
d$degreesubj1[d$edqsub66 =="Law"] <- "law"                         
d$degreesubj1[d$edqsub66 == "Law - LLB"] <-"law"                           
d$degreesubj1[d$edqsub66 == "Law LLB"] <- "law"                          
d$degreesubj1[d$edqsub66 == "Law with history"] <- "law"                          
d$degreesubj1[d$edqsub66 == "Law"] <- "law"                          
d$degreesubj1[d$edqsub66 =="Leisure management"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="MAPhilosophy/film&TV"] <- "Philosophy"                          
d$degreesubj1[d$edqsub66 == "MANAGEMENT STUDIES"] <- "Business, Accounting and Finance"                         
d$degreesubj1[d$edqsub66 =="MANAGMENT SCIENCE(MARKETI"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 ==" MANFACTURING ENGINEERING"] <- "Manufacturing Engineering"                         
d$degreesubj1[d$edqsub66 == "MANUFACTURING AND COMPUTI"] <- "Engineering"                         
d$degreesubj1[d$edqsub66 == "MARINE BIOLOGY"] <- "Biological and Agricultural Science"                         
d$degreesubj1[d$edqsub66 == "MATHAMATICS"] <- "Mathematics and Computing"                         
d$degreesubj1[d$edqsub66 == "MATHAMATICS/COMPUTING"] <- "Mathematics and Computing"                         
d$degreesubj1[d$edqsub66 == "MATHEMATICS"] <- "Mathematics and Computing"                         
d$degreesubj1[d$edqsub66 == "MATHEMATICS AND COMPUTER"] <- "Mathematics and Computing"                         
d$degreesubj1[d$edqsub66 == "MATHS"] <- "Mathematics and Computing"                        
d$degreesubj1[d$edqsub66 == "MATHS & COMPUTING"] <- "Mathematics and Computing"                         
d$degreesubj1[d$edqsub66 == "MATHS AND BUSINESS STUDIE"] <- "Mathematics and Computing"                         
d$degreesubj1[d$edqsub66 == "MATHS AND CHEMISTERY"] <- "Mathematics and Computing"                         
d$degreesubj1[d$edqsub66 == "MATHS AND EDUCATION"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 == "MATHS AND FRENCH"] <- "Mathematics and Computing"                
d$degreesubj1[d$edqsub66 == "MATHS AND PHYSICS"] <- "Mathematics and Computing"                        
d$degreesubj1[d$edqsub66 == "MATHS OPERATIONAL RESEARC"] <- "Mathematics and Computing"                         
d$degreesubj1[d$edqsub66 == "MATHS"] <- "Mathematics and Computing"                        
d$degreesubj1[d$edqsub66 == "MATHS/PHYSICS"] <- "Mathematics and Computing"                         
d$degreesubj1[d$edqsub66 == "MBCHB"] <- "Medicine and Dentistry"                          
d$degreesubj1[d$edqsub66 == "MECHANIC ENGINEERING"] <- "Mechanical Engineering"                         
d$degreesubj1[d$edqsub66 == "MECHANICAL ENGINEERING"] <- "Mechanical Engineering"                         
d$degreesubj1[d$edqsub66 == "MECHANICAL ENIGNERING"] <- "Mechanical Engineering"                         
d$degreesubj1[d$edqsub66 == "MEDIA AND ART STUDIES"] <- "Other"                          
d$degreesubj1[d$edqsub66 == "MEDIA STUDIES"] <- "Other"                         
d$degreesubj1[d$edqsub66 == "MEDICAL SCIENCES"] <- "Medicine and Dentistry"                          
d$degreesubj1[d$edqsub66 == "MEDICINE"] <- "Medicine and Dentistry"                         
d$degreesubj1[d$edqsub66 == "METALOGY"] <- "Other"                           
d$degreesubj1[d$edqsub66 == "MICRO-BIOLOGY"] <- "Biological and Agricultural Science"                         
d$degreesubj1[d$edqsub66 == "MICROBIOLOGY"] <- "Biological and Agricultural Science"                         
d$degreesubj1[d$edqsub66 == "MIDWIFERY"] <- "Other health"                          
d$degreesubj1[d$edqsub66 == "MODERN LANGUAGES & POLITI"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 == "MODERN LANGUAGEWS AND EUR"] <- "Languages and Area Studies"                         
d$degreesubj1[d$edqsub66 == "MODERN STUDIES"] <- "Other"                          
d$degreesubj1[d$edqsub66 == "MORSE-maths operational s"] <- "Mathematics and Computing"                         
d$degreesubj1[d$edqsub66 == "MUSIC"] <- "Music"                         
d$degreesubj1[d$edqsub66 == "MUSIC AND EDUCATION"] <- "Music"                          
d$degreesubj1[d$edqsub66 == "Management & Politics"] <- "Business, Accounting and Finance"                         
d$degreesubj1[d$edqsub66 == "Management Science"] <- "Business, Accounting and Finance"                         
d$degreesubj1[d$edqsub66 == "Management and Administra"] <- "Business, Accounting and Finance"                         
d$degreesubj1[d$edqsub66 == "Management sciences "] <- "Business, Accounting and Finance"                        
d$degreesubj1[d$edqsub66 == "Manufacturing Engineering"] <- "Manufacturing Engineering"                         
d$degreesubj1[d$edqsub66 == "Manufacturing Systems Eng"] <- "Manufacturing Engineering"                         
d$degreesubj1[d$edqsub66 == "Manufacturing Systems and"] <- "Manufacturing Engineering"                          
d$degreesubj1[d$edqsub66 == "Marketing Management"] <- "Business, Accounting and Finance"                         
d$degreesubj1[d$edqsub66 == "Mathematical Sciences"] <- "Mathematics and Computing"                         
d$degreesubj1[d$edqsub66 == "Mathematics and theoretic"] <- "Mathematics and Computing"                         
d$degreesubj1[d$edqsub66 == "Maths"] <- "Mathematics and Computing"                         
d$degreesubj1[d$edqsub66 == "Maths & Computer Science"] <- "Mathematics and Computing"                         
d$degreesubj1[d$edqsub66 == "Maths and management sc "] <- "Mathematics and Computing"                         
d$degreesubj1[d$edqsub66 == "Maths major with a comput"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 == "Mechanical Engineering"] <- "Mechanical Engineering"                         
d$degreesubj1[d$edqsub66 == "Medecine"] <- "Medicine and Dentistry"                          
d$degreesubj1[d$edqsub66 == "Media and Design (BA)"] <- "Other"                      
d$degreesubj1[d$edqsub66 == "Media and cultural studie"] <-  "Other"                         
d$degreesubj1[d$edqsub66 == "Media and management"] <- "Other"                          
d$degreesubj1[d$edqsub66 == "Medical Biochemistry"] <- "Biological and Agricultural Science"                         
d$degreesubj1[d$edqsub66 == "Medical Science"] <- "Medicine and Dentistry"                          
d$degreesubj1[d$edqsub66 == "Medicine"] <- "Medicine and Dentistry"                         
d$degreesubj1[d$edqsub66 == " Metals /jewellery design"] <- "Design"                          
d$degreesubj1[d$edqsub66 == "Microbiology"] <- "Biological and Agricultural Science"                         
d$degreesubj1[d$edqsub66 == "Modern Languages"] <- "Languages and Area Studies"                         
d$degreesubj1[d$edqsub66 == "Modern Languages  French"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 == "Modern chinese and japane"] <- "Languages and Area Studies"                         
d$degreesubj1[d$edqsub66 == "Modern studies"] <- "Other"                         
d$degreesubj1[d$edqsub66 == "Music"] <- "Music"                         
d$degreesubj1[d$edqsub66 == "Music and Education"] <- "Music"                         
d$degreesubj1[d$edqsub66 == "Music and Religious Educa"] <- "Music"                         
d$degreesubj1[d$edqsub66 == "Music in education "] <- "Music"                        
d$degreesubj1[d$edqsub66 == "NATURAL SCIENCE"] <- "Natural Sciences"                          
d$degreesubj1[d$edqsub66 == "NATURAL SCIENCES"] <- "Natural Sciences"                         
d$degreesubj1[d$edqsub66 == "NURSING"] <- "Nursing"                          
d$degreesubj1[d$edqsub66 == "NURSING STUDIES"] <- "Nursing"                         
d$degreesubj1[d$edqsub66 == "NUTRICIAN"] <- "Other health"                         
d$degreesubj1[d$edqsub66 == "NUTRITION AND DIETETICS"] <- "Other health"                         
d$degreesubj1[d$edqsub66 == "Natural Sciences"] <- "Natural Sciences"                         
d$degreesubj1[d$edqsub66 == "Nursing"] <- "Nursing"                         
d$degreesubj1[d$edqsub66 == "NursingStudies"] <- "Nursing"                         
d$degreesubj1[d$edqsub66 == "Nutritian"] <- "Other health"                         
d$degreesubj1[d$edqsub66 == "Nutrition"] <- "Other health"                         
d$degreesubj1[d$edqsub66 == "OCCUPATIONAL THERAPY"] <- "Other health"                         
d$degreesubj1[d$edqsub66 == "OPTOMITARY"] <- "Other health"                          
d$degreesubj1[d$edqsub66 == "ORDINARY ARTS DEGREE"] <- "Arts and Humanities"                         
d$degreesubj1[d$edqsub66 == "ORDINARY SOCIAL SCIENCE"] <- "Social Science"                          
d$degreesubj1[d$edqsub66 == "ORGANIC CHEMISTRY"] <- "Chemistry"                         
d$degreesubj1[d$edqsub66 == "Occupational therapy"] <- "Other health"                         
d$degreesubj1[d$edqsub66 == "Ophthalmic Optics"] <- "Other health"                          
d$degreesubj1[d$edqsub66 == "PERFORMING ARTS"] <- "Performing Arts"                         
d$degreesubj1[d$edqsub66 == "PERSONNEL MANAGEMENT"] <- "Business, Accounting and Finance"                         
d$degreesubj1[d$edqsub66 == "PHARMACOLOGY"] <- "Other health"                         
d$degreesubj1[d$edqsub66 == "PHARMACY"] <- "Other health"                          
d$degreesubj1[d$edqsub66 == "PHILOSOPHY"] <- "Philosophy"                         
d$degreesubj1[d$edqsub66 == " PHILOSPHY AND PSHYCOLOGY"] <- "Philosophy"                         
d$degreesubj1[d$edqsub66 == "PHSICAL EDUCATION"] <- "Sport Science"                         
d$degreesubj1[d$edqsub66 == "PHYLOSOPHY"] <- "Philosophy"                         
d$degreesubj1[d$edqsub66 == "PHYSCOLOGY"] <- "Psychology"                         
d$degreesubj1[d$edqsub66 == "PHYSIC"] <- "Physics"                           
d$degreesubj1[d$edqsub66 == "PHYSICS"] <- "Physics"                         
d$degreesubj1[d$edqsub66 == "PHYSICS AND BUSINESS STUD"] <- "Physics"                         
d$degreesubj1[d$edqsub66 =="PHYSICS AND ELECTRONIC EN"] <- "Physics"                          
d$degreesubj1[d$edqsub66 == "PHYSICS WITH LASER PHYSIC"] <- "Physics"                         
d$degreesubj1[d$edqsub66 == "PHYSICS WITH MEDICAL PHYS"] <- "Physics"                        
d$degreesubj1[d$edqsub66 == "PHYSIOLOGICAL SCIENCES"] <- "Other health"                          
d$degreesubj1[d$edqsub66 =="PHYSIOLOGY / PHARMACOLOGY"] <- "Other health"                          
d$degreesubj1[d$edqsub66 =="PHYSIOTHERAPY"] <- "Other health"                          
d$degreesubj1[d$edqsub66 == "PLANT AND ENVIRONMENTAL B"] <- "Biological and Agricultural Science"                         
d$degreesubj1[d$edqsub66 == "PODIATRIC MEDICINE "] <- "Other health"                        
d$degreesubj1[d$edqsub66 == "PODIATRY"] <- "Other health"                         
d$degreesubj1[d$edqsub66 == "POLITICS"] <- "Political Science"                          
d$degreesubj1[d$edqsub66 == "POLITICS AND HISTORY"] <- "Political Science"                         
d$degreesubj1[d$edqsub66 =="POLITICS AND LAW"] <- "Political Science"                          
d$degreesubj1[d$edqsub66 =="POLITICS AND PHILOSOPHY"] <- "Political Science"                          
d$degreesubj1[d$edqsub66 == "PRIMARY EDUCATION"] <- "Education"                         
d$degreesubj1[d$edqsub66 =="PROPERTY VALUATION AND FI"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="PSYCHOLOGY"] <- "Psychology"                           
d$degreesubj1[d$edqsub66 == "PSYCHOLOGY AND SOCIOLOGY"] <- "Psychology"                         
d$degreesubj1[d$edqsub66 == "PSYCHOLOGY WITH HISTORY"] <- "Psychology"                         
d$degreesubj1[d$edqsub66 == "PSYCHOLOGY, SOCIOLOGY"] <- "Psychology"                          
d$degreesubj1[d$edqsub66 == "PSYCHOLOGY/BUSINESS ADMIN"] <- "Psychology"                          
d$degreesubj1[d$edqsub66 =="PSYCHOLOGY/SOCIOLOGY/LAW"] <- "Psychology"                           
d$degreesubj1[d$edqsub66 == "PSYCOLOGY"] <- "Psychology"                        
d$degreesubj1[d$edqsub66 == "PUBLIC POLICY"] <- "Political Science"                         
d$degreesubj1[d$edqsub66 =="Paper Conservation "] <- "Other"                          
d$degreesubj1[d$edqsub66 == "Pharmacology"] <- "Other health"                         
d$degreesubj1[d$edqsub66 == "Pharmacy"] <- "Other health"                         
d$degreesubj1[d$edqsub66 == "Philosophy politics and e"] <- "Social Science"                         
d$degreesubj1[d$edqsub66 == "Physical Education and En"] <- "Sport Science"                          
d$degreesubj1[d$edqsub66 =="Physical Education and G "] <- "Sport Science"                         
d$degreesubj1[d$edqsub66 =="Physical education"] <- "Sport Science"                          
d$degreesubj1[d$edqsub66 =="Physics"] <- "Physics"                          
d$degreesubj1[d$edqsub66 == "Podiatry"] <- "Other health"                         
d$degreesubj1[d$edqsub66 =="Political science"] <- "Political Science"                          
d$degreesubj1[d$edqsub66 =="Politics"] <- "Political Science"                          
d$degreesubj1[d$edqsub66 == "Politics and history"] <- "Political Science"                         
d$degreesubj1[d$edqsub66 =="Politics"] <- "Political Science"                        
d$degreesubj1[d$edqsub66 == "Politics/Sociology "] <- "Political Science"                         
d$degreesubj1[d$edqsub66 == "Polymor Science and Techn"] <- "Manufacturing Engineering"                        
d$degreesubj1[d$edqsub66 == "Primary Education"] <- "Education"                         
d$degreesubj1[d$edqsub66 == "Primary Teaching"] <- "Education"                         
d$degreesubj1[d$edqsub66 =="Printing and photography"] <- "Other"                          
d$degreesubj1[d$edqsub66 == "Product Management"] <- "Other"                         
d$degreesubj1[d$edqsub66 == "Prot design"] <- "Design"                         
d$degreesubj1[d$edqsub66 == "Psychology"] <- "Psychology"                         
d$degreesubj1[d$edqsub66 == "Psychology "] <- "Psychology"                        
d$degreesubj1[d$edqsub66 == "Psycology"] <- "Psychology"                         
d$degreesubj1[d$edqsub66 == "Public Administartion"] <- "Social Policy"                         
d$degreesubj1[d$edqsub66 =="QUALITY MANAGEMENT"] <- "Other"                          
d$degreesubj1[d$edqsub66 == "QUANTITY SURVEYING"] <- "Construction Engineering"                          
d$degreesubj1[d$edqsub66 == "Quantity SURVEYING"] <- "Construction Engineering"                         
d$degreesubj1[d$edqsub66 == "Quantity Surveying"] <-  "Construction Engineering"                        
d$degreesubj1[d$edqsub66 =="Quantity surveying"] <- "Construction Engineering"                          
d$degreesubj1[d$edqsub66 == "RADIOGRAPHY"] <- "Other health"                         
d$degreesubj1[d$edqsub66 == "REAL TIME COMPUTER SYSTEM"] <- "Engineering"                         
d$degreesubj1[d$edqsub66 == "RELIGION"] <- "Theology"                         
d$degreesubj1[d$edqsub66 == "RELIGIOUS EDUCATION"] <- "Theology"                         
d$degreesubj1[d$edqsub66 =="RISK MANAGEMENT"] <- "Other"                          
d$degreesubj1[d$edqsub66 == "Religious Education/Socio"] <- "Theology"                         
d$degreesubj1[d$edqsub66 == "Residential Dev "] <- "Other"                         
d$degreesubj1[d$edqsub66 == "Retail and Distribution M"] <- "Other"                         
d$degreesubj1[d$edqsub66 == "SCIENCE AND THE ENVIROMEN"] <- "Science"                         
d$degreesubj1[d$edqsub66 == "SOCIAL ANTHROPOLOGY"] <- "Social Science"                         
d$degreesubj1[d$edqsub66 =="SOCIAL POLICY AND ADMINIS"] <- "Social Policy"                           
d$degreesubj1[d$edqsub66 == "SOCIAL SCIENCE"] <- "Social Science"                         
d$degreesubj1[d$edqsub66 =="SOCIAL SCIENCES"] <- "Social Science"                          
d$degreesubj1[d$edqsub66 == "SOCIAL STUDIES WITH OUTDO"] <- "Social Science"                         
d$degreesubj1[d$edqsub66 == "SOCIAL WORK"] <- "Social Science"                         
d$degreesubj1[d$edqsub66 == "SOCIOLIGY"] <- "Sociology"                          
d$degreesubj1[d$edqsub66 == "SOCIOLOGY"] <- "Sociology"                         
d$degreesubj1[d$edqsub66 == "SOVIET/EASTR EURO STUDIES"] <- "Languages and Area Studies"                         
d$degreesubj1[d$edqsub66 == "SPANISH AND LATINAMERICAN"] <- "Languages and Area Studies"                         
d$degreesubj1[d$edqsub66 =="SPORT IN THE COMMUNITY"] <- "Sport Science"                           
d$degreesubj1[d$edqsub66 == "SYSTEMS ENGINEERING"] <- "Engineering"                         
d$degreesubj1[d$edqsub66 == "Silversmith and metal wor"] <- "Other"                         
d$degreesubj1[d$edqsub66 =="Social & political studie"] <- "Social Science"                          
d$degreesubj1[d$edqsub66 == "Social Policy"] <- "Social Policy"                          
d$degreesubj1[d$edqsub66 == "Social Policy & Administr"] <- "Social Policy"                         
d$degreesubj1[d$edqsub66 == "Social Policy and Adminis"] <- "Social Policy"                         
d$degreesubj1[d$edqsub66 =="Social Science"] <- "Social Science"                          
d$degreesubj1[d$edqsub66 =="Social anthropology"] <- "Social Science"                          
d$degreesubj1[d$edqsub66 =="Social psychology and soc"] <- "Social Science"                          
d$degreesubj1[d$edqsub66 =="Social science"] <- "Social Science"                          
d$degreesubj1[d$edqsub66 == "Socialogy History"] <- "Sociology"                         
d$degreesubj1[d$edqsub66 =="Society,Economy and socia"] <- "Social Science"                          
d$degreesubj1[d$edqsub66 == "Sociology"] <- "Sociology"                         
d$degreesubj1[d$edqsub66 == "Sociology & Social physco"] <- "Sociology"                          
d$degreesubj1[d$edqsub66 == "Spanish & psychology"] <- "Languages and Area Studies"                         
d$degreesubj1[d$edqsub66 == "Spanish with theology"] <- "Languages and Area Studies"                         
d$degreesubj1[d$edqsub66 == " Sport and Human Movement"] <- "Sport Science"                        
d$degreesubj1[d$edqsub66 == "Sports Studies in Sport &"] <- "Sport Science"                         
d$degreesubj1[d$edqsub66 == "Sports science"] <- "Sport Science"                         
d$degreesubj1[d$edqsub66 == "Statistics"] <- "Mathematics and Computing"                         
d$degreesubj1[d$edqsub66 =="TEACHER TRAINING MATHS"] <- "Education"                          
d$degreesubj1[d$edqsub66 == "TEXTILE DESIGN"] <- "Design"                         
d$degreesubj1[d$edqsub66 == "THE BUILT ENVIRONMENT"] <- "Design"                         
d$degreesubj1[d$edqsub66 == "THEATRE DESIGN"] <- "Design"                         
d$degreesubj1[d$edqsub66 == "THEOLOGY"] <- "Theology"                         
d$degreesubj1[d$edqsub66 == "THEOLOGY AND EDUCATION"] <- "Theology"                          
d$degreesubj1[d$edqsub66 == "THEOLOGY AND PASTORAL STU"] <- "Theology"                         
d$degreesubj1[d$edqsub66 == "THREE DIMENSIONAL DESIGN"] <- "Design"                          
d$degreesubj1[d$edqsub66 == "TIME BASED MEDIA"] <- "Other"                         
d$degreesubj1[d$edqsub66 =="TOWN AND REGIOAL PLANNING"] <- "Other"                          
d$degreesubj1[d$edqsub66 == "Tapestry"] <- "Design"                         
d$degreesubj1[d$edqsub66 == "Teaching studies and"] <- "Education"                         
d$degreesubj1[d$edqsub66 == "Textile Design"] <- "Design"                          
d$degreesubj1[d$edqsub66 == "Textile and knitwear tech"] <- "Design"                          
d$degreesubj1[d$edqsub66 == "Textile design and techno"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="Textiles and fashion embr"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="Theology"] <- "Theology"                          
d$degreesubj1[d$edqsub66 == "Thre dimentional design"] <- "Design"                         
d$degreesubj1[d$edqsub66 =="Three D Ceramic design"] <- "Design"                         
d$degreesubj1[d$edqsub66 == "Town and Country Planning"] <- "Other"                         
d$degreesubj1[d$edqsub66 == "  URBAN ESTATE MANAGEMENT"] <- "Other"                         
d$degreesubj1[d$edqsub66 == "URBAN POLICY AND RACE REL"] <- "Social Science"                          
d$degreesubj1[d$edqsub66 == "URBAN STUDIES"] <- "Social Science"                         
d$degreesubj1[d$edqsub66 == "Urban Land Economics"] <- "Economics"                          
d$degreesubj1[d$edqsub66 == "ZOOLOGY"] <- "Biological and Agricultural Science"                           
d$degreesubj1[d$edqsub66 == "accoiunting"] <- "Business, Accounting and Finance"                         
d$degreesubj1[d$edqsub66 == "acconomics"] <-  "Economics"                         
d$degreesubj1[d$edqsub66 == "accountancy"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="accountancy and finance"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 == "accountancy finance"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 == "accounting"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 == "accounting and finance"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 == "accounting and management"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="accounting finance & ec"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 == "accounts"] <- "Business, Accounting and Finance"                         
d$degreesubj1[d$edqsub66 == "advance professional prac"] <- "Other"                          
d$degreesubj1[d$edqsub66 == "aeronautical engineering"] <- "Aerospace Engineering"                         
d$degreesubj1[d$edqsub66 ==  "agraicultural science"] <- "Biological and Agricultural Science"                         
d$degreesubj1[d$edqsub66 == "agricultrual economics"] <- "Economics"                         
d$degreesubj1[d$edqsub66 == "agricultural  marketing"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 == "agricultural and enviromn"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 == "agriculture"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 =="american  studies"] <- "American Studies"                         
d$degreesubj1[d$edqsub66 =="american studies"] <- "American Studies"                          
d$degreesubj1[d$edqsub66 == "anatomy"] <- "Biological and Agricultural Science"                         
d$degreesubj1[d$edqsub66 == "animal science"] <- "Biological and Agricultural Science"                         
d$degreesubj1[d$edqsub66 =="animal ssciences"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 == "aplied chemisry"] <- "Chemistry"                         
d$degreesubj1[d$edqsub66 == "applied biology"] <- "Biological and Agricultural Science"                         
d$degreesubj1[d$edqsub66 == "applied chemistry"] <- "Chemistry"                         
d$degreesubj1[d$edqsub66 == "applied ecology"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 =="applied geology"] <- "Geology"                          
d$degreesubj1[d$edqsub66 =="applied physics"] <- "Physics"                          
d$degreesubj1[d$edqsub66 == "applied social studies"] <- "Social Science"                         
d$degreesubj1[d$edqsub66 == "apploied social sciences"] <- "Social Science"                         
d$degreesubj1[d$edqsub66 == "archeaology and anthropol"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 == "architec\ture/"] <- "Architecture"                         
d$degreesubj1[d$edqsub66 == "architecture"] <- "Architecture"                         
d$degreesubj1[d$edqsub66 =="art"] <- "Art"                          
d$degreesubj1[d$edqsub66 == "art and design"] <- "Art"                         
d$degreesubj1[d$edqsub66 == "art and design foundation"] <- "Art"                         
d$degreesubj1[d$edqsub66 == "astro physics"] <- "Physics"                          
d$degreesubj1[d$edqsub66 == "astro-physics"] <- "Physics"                          
d$degreesubj1[d$edqsub66 == "b a natural sciences"] <- "Natural Sciences"                         
d$degreesubj1[d$edqsub66 == "ba with qualteaching s"] <- "Education"                         
d$degreesubj1[d$edqsub66 == "bs c"] <- "Other"                          
d$degreesubj1[d$edqsub66 == "bsc quantity surveying"] <- "Construction Engineering"                        
d$degreesubj1[d$edqsub66 == "ba archiology"] <- "History and Archaeology"                         
d$degreesubj1[d$edqsub66 == "ba history"] <- "History and Archaeology"                         
d$degreesubj1[d$edqsub66 == " bachelor af arts b a hon"] <- "Other"                        
d$degreesubj1[d$edqsub66 == "  bachelor of ACCOUNTANCY"] <- "Business, Accounting and Finance"                         
d$degreesubj1[d$edqsub66 == "bachelor of dental surger"] <- "Medicine and Dentistry"                         
d$degreesubj1[d$edqsub66 == "bachelor of ed in geograp"] <- "Education"                         
d$degreesubj1[d$edqsub66 == "bachelor of education"] <- "Education"                         
d$degreesubj1[d$edqsub66 == "bachelor of medicine"] <- "Medicine and Dentistry"                         
d$degreesubj1[d$edqsub66 == "bachelor of nursing"] <- "Nursing"                         
d$degreesubj1[d$edqsub66 =="bachlor of education"] <- "Education"                          
d$degreesubj1[d$edqsub66 == "banking"] <-  "Business, Accounting and Finance"                        
d$degreesubj1[d$edqsub66 == "banking and finance"] <- "Business, Accounting and Finance"                         
d$degreesubj1[d$edqsub66 == "banking, finqance and ret"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="bat of  educat"] <- "Education"                          
d$degreesubj1[d$edqsub66 == "batch of educ"] <- "Education"                         
d$degreesubj1[d$edqsub66 == "batchalor of education ed"] <- "Education"                         
d$degreesubj1[d$edqsub66 == "batchelor of dentist surg"] <- "Medicine and Dentistry"                         
d$degreesubj1[d$edqsub66 == "batchelor of education"] <- "Education"                          
d$degreesubj1[d$edqsub66 == "batchlor of dental surger"] <- "Medicine and Dentistry"                         
d$degreesubj1[d$edqsub66 =="bathchelers degree miechu"] <- "Other"                           
d$degreesubj1[d$edqsub66 == "beed"] <- "Education"                        
d$degreesubj1[d$edqsub66 =="bichemistry and genitics"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 =="bio  ch"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 =="bio chemistry"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 ==" bio-oranic chemistry and"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 =="biochemistry"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 =="biological science"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 =="biological sciences"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 =="biological scince"] <-  "Biological and Agricultural Science"                         
d$degreesubj1[d$edqsub66 =="biology"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 =="biology science"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 =="bioltechnology"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 =="biomedical science"] <- "Other health"                          
d$degreesubj1[d$edqsub66 =="biomedical technology"] <- "Other health"                          
d$degreesubj1[d$edqsub66 =="bmed(sci)"] <- "Other health"                         
d$degreesubj1[d$edqsub66 =="botany"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 =="bsc"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="building surveying"] <- "Construction Engineering"                          
d$degreesubj1[d$edqsub66 =="building surveying BSc Ho"] <- "Construction Engineering"                          
d$degreesubj1[d$edqsub66 =="buisiness information sys"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="busines management"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="business /politics"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="business admin"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="business admin & language"] <- "Business, Accounting and Finance"    
d$degreesubj1[d$edqsub66 =="business administartion"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="business administration"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="business and finance"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="business computing"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="business economics and ac"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="business information syst"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="business managemnet"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="business operation and co"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="business studies"] <- "Business, Accounting and Finance"                         
d$degreesubj1[d$edqsub66 =="business studies and tour"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="business studies andFrenc"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="business studies with"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="business studies with mar"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="business studies/marketin"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="business with languages"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="cell and molecular biolog"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 =="cell biology"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 =="chem/bio chem"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 =="chemical engineerimg"] <- "Chemical Engineering"                          
d$degreesubj1[d$edqsub66 =="chemical engineering"] <- "Chemical Engineering"                          
d$degreesubj1[d$edqsub66 =="chemical process engineer"] <- "Chemical Engineering"                          
d$degreesubj1[d$edqsub66 =="chemistry"] <- "Chemistry"                         
d$degreesubj1[d$edqsub66 =="chemistry and physics"] <- "Chemistry"                          
d$degreesubj1[d$edqsub66 =="civil engineering"] <- "Civil Engineering"                          
d$degreesubj1[d$edqsub66 =="civil instructural engine"] <- "Civil Engineering"                          
d$degreesubj1[d$edqsub66 =="classical music"] <- "Music"                          
d$degreesubj1[d$edqsub66 =="classics"] <- "Classics"                          
d$degreesubj1[d$edqsub66 =="classics & english"] <- "Classics"                          
d$degreesubj1[d$edqsub66 =="co;mputing"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 =="combined   studies"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="combined arts"] <- "Arts and Humanities"                          
d$degreesubj1[d$edqsub66 =="combined maths/psychology"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 =="combined science"] <- "Natural Sciences"                          
d$degreesubj1[d$edqsub66 =="combined studies"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="combined studies with"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="combined studies, physics"] <- "Physics"                          
d$degreesubj1[d$edqsub66 =="communication arts"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="communications"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="communications enginearin"] <- "Electronic and Electrical Engineering"                          
d$degreesubj1[d$edqsub66 =="communications systems e"] <- "Electronic and Electrical Engineering"                           
d$degreesubj1[d$edqsub66 =="community nursing"] <-  "Nursing"                         
d$degreesubj1[d$edqsub66 =="comp[uter science"] <-  "Mathematics and Computing"                         
d$degreesubj1[d$edqsub66 =="comptor  studies"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 =="computer and electronic e"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 =="computer science"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 =="computer studies"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 =="computer systems engineer"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 =="computing"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 =="computing and finance"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 =="computor   science"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 =="computor science"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 =="construction"] <-  "Construction Engineering"                         
d$degreesubj1[d$edqsub66 =="construction management"] <- "Construction Engineering"                          
d$degreesubj1[d$edqsub66 =="construction managerment"] <- "Construction Engineering"                         
d$degreesubj1[d$edqsub66 =="construction mgt"] <- "Construction Engineering"                          
d$degreesubj1[d$edqsub66 =="constructiuon management"] <- "Construction Engineering"                           
d$degreesubj1[d$edqsub66 =="criminal justice and poli"] <- "Criminology"                          
d$degreesubj1[d$edqsub66 =="cultural studies"] <- "Cultural Studies"                          
d$degreesubj1[d$edqsub66 =="dance and history"] <- "Performing Arts"                           
d$degreesubj1[d$edqsub66 =="dance and performong arts"] <- "Performing Arts"                         
d$degreesubj1[d$edqsub66 =="dance and society"] <- "Performing Arts"                          
d$degreesubj1[d$edqsub66 =="dentistry"] <- "Medicine and Dentistry"                          
d$degreesubj1[d$edqsub66 =="design and advertising"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="design and applied techno"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="design representation"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="design technology with ed"] <- "Education"                          
d$degreesubj1[d$edqsub66 =="development economics"] <- "Economics"                          
d$degreesubj1[d$edqsub66 =="devinity"] <- "Theology"                          
d$degreesubj1[d$edqsub66 =="dietetetics"] <- "Other health"                          
d$degreesubj1[d$edqsub66 =="digital sytems engineerin"] <- "Electronic and Electrical Engineering"                           
d$degreesubj1[d$edqsub66 =="drama"] <- "Performing Arts"                          
d$degreesubj1[d$edqsub66 =="  eNGINEERING ELECTRONICS"] <- "Electronic and Electrical Engineering"                          
d$degreesubj1[d$edqsub66 =="earth sciences"] <- "Geology"                          
d$degreesubj1[d$edqsub66 =="eauropean studies with fr"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="ecconomics"] <- "Economics"                          
d$degreesubj1[d$edqsub66 =="ecology"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 =="ecology and environmental"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 =="ecology and greography"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 =="ecomics and politics"] <- "Economics"                          
d$degreesubj1[d$edqsub66 =="econ"] <- "Economics"                          
d$degreesubj1[d$edqsub66 =="economic and sociology bs"] <- "Economics"                          
d$degreesubj1[d$edqsub66 =="economics"] <- "Economics"                         
d$degreesubj1[d$edqsub66 =="economics & sociology"] <- "Economics"                          
d$degreesubj1[d$edqsub66 =="economics & spannish"] <- "Economics"                         
d$degreesubj1[d$edqsub66 =="economics and finance"] <- "Economics"                          
d$degreesubj1[d$edqsub66 =="economics and industrial"] <- "Economics"                          
d$degreesubj1[d$edqsub66 =="economics and law"] <- "Economics"                          
d$degreesubj1[d$edqsub66 =="economics and politics"] <- "Economics"                         
d$degreesubj1[d$edqsub66 =="education"] <- "Education"                          
d$degreesubj1[d$edqsub66 =="education and english"] <- "Education"                          
d$degreesubj1[d$edqsub66 =="education and science"] <- "Education"                          
d$degreesubj1[d$edqsub66 =="education and social stud"] <- "Education"                           
d$degreesubj1[d$edqsub66 =="education/teaching"] <- "Education"                          
d$degreesubj1[d$edqsub66 =="eduction ba"] <- "Education"                           
d$degreesubj1[d$edqsub66 =="electonic engineering"] <- "Electronic and Electrical Engineering"                           
d$degreesubj1[d$edqsub66 =="electrical and electronic"] <- "Electronic and Electrical Engineering"                          
d$degreesubj1[d$edqsub66 =="electrical electronics"] <- "Electronic and Electrical Engineering"                          
d$degreesubj1[d$edqsub66 =="electronic /electriacl en"] <- "Electronic and Electrical Engineering"                          
d$degreesubj1[d$edqsub66 =="electronic and electrical"] <- "Electronic and Electrical Engineering"                          
d$degreesubj1[d$edqsub66 =="electronic engin eering"] <- "Electronic and Electrical Engineering"                          
d$degreesubj1[d$edqsub66 =="electronic engineering"] <- "Electronic and Electrical Engineering"                         
d$degreesubj1[d$edqsub66 =="electronic imaging and me"] <- "Electronic and Electrical Engineering"                          
d$degreesubj1[d$edqsub66 =="electronic systems design"] <- "Electronic and Electrical Engineering"                          
d$degreesubj1[d$edqsub66 =="electronics"] <- "Electronic and Electrical Engineering"                          
d$degreesubj1[d$edqsub66 =="electronics and communica"] <- "Electronic and Electrical Engineering"                          
d$degreesubj1[d$edqsub66 =="electronics computing and"] <- "Electronic and Electrical Engineering"                          
d$degreesubj1[d$edqsub66 =="electronics engineering"] <- "Electronic and Electrical Engineering"                          
d$degreesubj1[d$edqsub66 =="elentronic engineering "] <- "Electronic and Electrical Engineering"                         
d$degreesubj1[d$edqsub66 =="eng lang and lit"] <- "English"                          
d$degreesubj1[d$edqsub66 =="eng lit and sociolgy"] <- "English"                         
d$degreesubj1[d$edqsub66 =="eng with qualified teach "] <- "English"                        
d$degreesubj1[d$edqsub66 =="engand history "] <- "History and Archaeology"                         
d$degreesubj1[d$edqsub66 =="engineering"] <- "Engineering"                           
d$degreesubj1[d$edqsub66 ==" engineering - mechanical"] <- "Mechanical Engineering"                          
d$degreesubj1[d$edqsub66 =="engineering and business"] <- "Engineering"                          
d$degreesubj1[d$edqsub66 =="engineering design"] <- "Engineering"                          
d$degreesubj1[d$edqsub66 =="engineering product desig"] <- "Engineering"                          
d$degreesubj1[d$edqsub66 =="engineering with technolo"] <- "Engineering"                          
d$degreesubj1[d$edqsub66 =="engineering-automotive de"] <- "Engineering"                          
d$degreesubj1[d$edqsub66 =="english"] <- "English"                          
d$degreesubj1[d$edqsub66 =="english and french"] <- "English"                           
d$degreesubj1[d$edqsub66 =="english and history"] <- "English"                          
d$degreesubj1[d$edqsub66 =="english and modern studie"] <- "English"                          
d$degreesubj1[d$edqsub66 =="english and philosphy"] <- "English"                          
d$degreesubj1[d$edqsub66 =="english and politics"] <- "English"                          
d$degreesubj1[d$edqsub66 =="english and related arts"] <- "English"                          
d$degreesubj1[d$edqsub66 =="english and sociology"] <- "English"                          
d$degreesubj1[d$edqsub66 =="english lit"] <- "English"                          
d$degreesubj1[d$edqsub66 =="english lit and language"] <- "English"                          
d$degreesubj1[d$edqsub66 =="english literature"] <- "English"                          
d$degreesubj1[d$edqsub66 =="english literature and am"] <- "English"                          
d$degreesubj1[d$edqsub66 =="english litriture"] <- "English"                         
d$degreesubj1[d$edqsub66 =="english studies"] <- "English"                          
d$degreesubj1[d$edqsub66 =="english studies ba"] <- "English"                         
d$degreesubj1[d$edqsub66 =="english with media studie"] <- "English"                          
d$degreesubj1[d$edqsub66 =="english/classic joint hon"] <- "English"                          
d$degreesubj1[d$edqsub66 =="english/drama/media/phyco"] <- "English"                          
d$degreesubj1[d$edqsub66 =="english/french"] <- "English"                          
d$degreesubj1[d$edqsub66 =="english/religious studies"] <- "English"                          
d$degreesubj1[d$edqsub66 =="enviromeental studies"] <- "Environmental Science"                          
d$degreesubj1[d$edqsub66 =="enviromental pollution"] <- "Environmental Science"                          
d$degreesubj1[d$edqsub66 =="enviromental science "] <- "Environmental Science"                         
d$degreesubj1[d$edqsub66 =="enviromental studies"] <- "Environmental Science"                          
d$degreesubj1[d$edqsub66 =="environmental engineering"] <- "Environmental Science"                          
d$degreesubj1[d$edqsub66 =="environmental health"] <- "Environmental Science"                          
d$degreesubj1[d$edqsub66 =="environmental management"] <- "Environmental Science"                          
d$degreesubj1[d$edqsub66 =="environmental science"] <- "Environmental Science"                          
d$degreesubj1[d$edqsub66 =="environmental studioes"] <- "Environmental Science"                          
d$degreesubj1[d$edqsub66 =="estate management"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="european business adminis"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="european business and Fre"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="european business systems"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="european engineering"] <- "Engineering"                          
d$degreesubj1[d$edqsub66 =="european studies"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="export engineering"] <- "Engineering"                          
d$degreesubj1[d$edqsub66 =="fashion"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="fashion and textiles"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="fashion design"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="film and theatre"] <- "Performing Arts"                         
d$degreesubj1[d$edqsub66 =="film studies"] <- "Performing Arts"                         
d$degreesubj1[d$edqsub66 =="financial economics"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="financial services"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="financila services"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="fine art"] <- "Art"                          
d$degreesubj1[d$edqsub66 =="fine art and design"] <- "Art"                          
d$degreesubj1[d$edqsub66 =="fine art valuation"] <- "Art"                          
d$degreesubj1[d$edqsub66 =="fine arts"] <- "Art"                          
d$degreesubj1[d$edqsub66 =="food and consumer studies"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="food marketing"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="french"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="french and business studi"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="french and computer scien"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="french and german"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="french and history"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="french and linguistics"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="french and spanish"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="french, spanish and busin"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="french/ german"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="furnature design"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="furniture and product des"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="gallery studies"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="general arts"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="general engineering"] <- "Engineering"                          
d$degreesubj1[d$edqsub66 =="genetics"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 =="geo chemistry"] <- "Chemistry"                          
d$degreesubj1[d$edqsub66 =="geog"] <- "Geography"                          
d$degreesubj1[d$edqsub66 =="geography"] <- "Geography"                         
d$degreesubj1[d$edqsub66 =="geography /geology"] <- "Geography"                          
d$degreesubj1[d$edqsub66 =="geography BA"] <- "Geography"                          
d$degreesubj1[d$edqsub66 =="geography and computer sc"] <- "Geography"                          
d$degreesubj1[d$edqsub66 =="geograpy"] <- "Geography"                          
d$degreesubj1[d$edqsub66 =="geogrsphy"] <- "Geography"                          
d$degreesubj1[d$edqsub66 =="geology"] <- "Geology"                           
d$degreesubj1[d$edqsub66 =="geophysics and planetary"] <- "Physics"                           
d$degreesubj1[d$edqsub66 =="gepgraphy"] <- "Geography"                          
d$degreesubj1[d$edqsub66 =="german"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="german and music"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="german and russian"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="german studies"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="govermment/politics"] <- "Political Science"                          
d$degreesubj1[d$edqsub66 =="governmet"] <- "Political Science"                          
d$degreesubj1[d$edqsub66 =="graphic design"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="hairdressing"] <- "None"                          
d$degreesubj1[d$edqsub66 =="health & social welfare"] <- "Other health"                          
d$degreesubj1[d$edqsub66 =="health studies"] <- "Other health"                          
d$degreesubj1[d$edqsub66 =="hispanic studies"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="historical studies"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="history"] <- "History and Archaeology"                         
d$degreesubj1[d$edqsub66 =="history & education"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="history and American stud"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="history and art"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="history and economics"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="history and english"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="history and politics"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="history and war studies w"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="history of art"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="history with assoc drama"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="history&government"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="history/economics"] <-  "History and Archaeology"                         
d$degreesubj1[d$edqsub66 =="history/education"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="history/geography"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="hopsitality management"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="hospitallity maagement"] <- "Other"                           
d$degreesubj1[d$edqsub66 =="hote;l managementand hhos"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="hotel and catering manage"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="hotel management"] <- "Other"                           
d$degreesubj1[d$edqsub66 =="housing studies"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="human biology"] <- "Biological and Agricultural Science"                           
d$degreesubj1[d$edqsub66 =="human environmental scien"] <- "Science"                          
d$degreesubj1[d$edqsub66 =="human organisations"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="human resourses"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="humanities"] <- "Arts and Humanities"                          
d$degreesubj1[d$edqsub66 =="in business administratio"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="industrial chemistry"] <- "Chemistry"                          
d$degreesubj1[d$edqsub66 =="industrial design"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="industrial studies" ] <- "Design"                         
d$degreesubj1[d$edqsub66 =="info tech"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="information management an"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="interier desighn"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="interior design"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="interior design and techn"] <- "Design"                           
d$degreesubj1[d$edqsub66 =="interior designs"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="international business an"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="international history and"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="international transport"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="it"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="jewellery"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="jewellery design and craf"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="land economics"] <- "Economics"                          
d$degreesubj1[d$edqsub66 =="land economiss"] <- "Economics"                          
d$degreesubj1[d$edqsub66 =="language and linguistics"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="latin"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="law"] <- "law"                         
d$degreesubj1[d$edqsub66 =="law and Indonesian studie"] <- "law"                          
d$degreesubj1[d$edqsub66 =="law and decision making"] <- "law"                          
d$degreesubj1[d$edqsub66 =="leisure manaement"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="leisure management"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="leisure studies"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="librarianship and informa"] <- "Other"                         
d$degreesubj1[d$edqsub66 =="librsry & information std"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="linguistic and internatio"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 ==" linguistics and language"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="mATHEMATICVAL ASTATISTICS"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 == "major law minor accountin"] <- "law"                         
d$degreesubj1[d$edqsub66 == "management"] <- "Business, Accounting and Finance"                         
d$degreesubj1[d$edqsub66 =="management science"] <- "Business, Accounting and Finance"                         
d$degreesubj1[d$edqsub66 =="management studies"] <- "Business, Accounting and Finance"                         
d$degreesubj1[d$edqsub66 =="management studies with r"] <- "Business, Accounting and Finance"                         
d$degreesubj1[d$edqsub66 =="managerial and admin"] <- "Business, Accounting and Finance"                         
d$degreesubj1[d$edqsub66 =="managerial and admin stud"] <- "Business, Accounting and Finance"                         
d$degreesubj1[d$edqsub66 =="manufacturing engineering"] <- "Engineering"                          
d$degreesubj1[d$edqsub66 =="marine biology and oceano"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 =="marketing"] <- "Business, Accounting and Finance"                         
d$degreesubj1[d$edqsub66 =="marketing and french"] <- "Business, Accounting and Finance"                         
d$degreesubj1[d$edqsub66 =="marketting with french"] <- "Business, Accounting and Finance"                         
d$degreesubj1[d$edqsub66 =="materials technology"] <- "Engineering"                          
d$degreesubj1[d$edqsub66 =="math phsycology biblical"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 =="mathematic and professio"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 =="mathematical studies"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 =="mathmatics for business a"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 =="maths"] <- "Mathematics and Computing"                         
d$degreesubj1[d$edqsub66 =="maths  q t s"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 =="maths & computer science"] <-  "Mathematics and Computing"                         
d$degreesubj1[d$edqsub66 =="maths and economics"] <- "Mathematics and Computing"                           
d$degreesubj1[d$edqsub66 =="maths and education"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 =="maths and managment"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 =="maths with computing"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 =="maths/computer stud"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 =="maths/computing"] <-  "Mathematics and Computing"                         
d$degreesubj1[d$edqsub66 =="mechanical Engineering"] <- "Mechanical Engineering"                          
d$degreesubj1[d$edqsub66 =="mechanical engineer"] <- "Mechanical Engineering"                          
d$degreesubj1[d$edqsub66 =="mechanical engineering"] <- "Mechanical Engineering"                         
d$degreesubj1[d$edqsub66 =="medaeval & modern history"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="medeiaval history"] <- "History and Archaeology"                          
d$degreesubj1[d$edqsub66 =="media production"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="media production design"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="media/communication studi"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="medical media"] <- "Other health"                          
d$degreesubj1[d$edqsub66 =="medical sciences"] <- "Other health"                           
d$degreesubj1[d$edqsub66 =="medicine"] <- "Medicine and Dentistry"                         
d$degreesubj1[d$edqsub66 =="medicine and surgery"] <- "Medicine and Dentistry"                          
d$degreesubj1[d$edqsub66 =="medicine mb -bch"] <- "Medicine and Dentistry"                           
d$degreesubj1[d$edqsub66 =="medieval history"] <- "History and Archaeology"                         
d$degreesubj1[d$edqsub66 =="micro biology"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 =="micro electronics"] <- "Electronic and Electrical Engineering"                          
d$degreesubj1[d$edqsub66 =="microbiology"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 =="modern european studies"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="modern history"] <-  "History and Archaeology"                         
d$degreesubj1[d$edqsub66 =="modern history ba"] <- "History and Archaeology"                         
d$degreesubj1[d$edqsub66 =="modern languages"] <- "Languages and Area Studies"                         
d$degreesubj1[d$edqsub66 =="modern languages & inform"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="modern languages and ling"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="modern languages with int"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 ==" modern languages, French"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="molecular biology"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 =="music"] <- "Music"                          
d$degreesubj1[d$edqsub66 =="music and education"] <- "Music"                          
d$degreesubj1[d$edqsub66 =="music/education"] <- "Music"                          
d$degreesubj1[d$edqsub66 =="natural sciences"] <- "Natural Sciences"                          
d$degreesubj1[d$edqsub66 =="neuro-physiology"] <- "Other health"                          
d$degreesubj1[d$edqsub66 =="nurceing"] <- "Nursing"                          
d$degreesubj1[d$edqsub66 =="nursing professional prac"] <- "Nursing"                          
d$degreesubj1[d$edqsub66 =="nursing studies"] <- "Nursing"                          
d$degreesubj1[d$edqsub66 =="nutrition and biology"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 =="  occupational psychology"] <- "Psychology"                          
d$degreesubj1[d$edqsub66 =="occupational therapy"] <- "Other health"                          
d$degreesubj1[d$edqsub66 =="occupational therapy/-"] <- "Other health"                          
d$degreesubj1[d$edqsub66 =="oceanography with chemist"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 =="opthalmic optics"] <- "Other health"                          
d$degreesubj1[d$edqsub66 =="osteopathy"] <- "Other health"                          
d$degreesubj1[d$edqsub66 =="pathology"] <- "Medicine and Dentistry"                          
d$degreesubj1[d$edqsub66 =="pharmaceutical science"] <- "Other health"                          
d$degreesubj1[d$edqsub66 =="pharmacology"] <- "Other health"                          
d$degreesubj1[d$edqsub66 =="pharmacy"] <- "Other health"                          
d$degreesubj1[d$edqsub66 =="philosophy & literature"] <- "Philosophy"                          
d$degreesubj1[d$edqsub66 =="philosophy politics and e"] <- "Social Science"                          
d$degreesubj1[d$edqsub66 =="philosphy and theology"] <- "Philosophy"                          
d$degreesubj1[d$edqsub66 =="photography"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="phsiology"] <- "Biological and Agricultural Science"                         
d$degreesubj1[d$edqsub66 =="phsychology"] <- "Psychology"                         
d$degreesubj1[d$edqsub66 =="phycology"] <- "Psychology"                          
d$degreesubj1[d$edqsub66 =="physical education"] <- "Sport Science"                         
d$degreesubj1[d$edqsub66 =="physical electronics with"] <- "Electronic and Electrical Engineering"                         
d$degreesubj1[d$edqsub66 =="physics"] <- "Physics"                         
d$degreesubj1[d$edqsub66 =="physics and electronics"] <- "Physics"                          
d$degreesubj1[d$edqsub66 =="physics and music"] <- "Physics"                          
d$degreesubj1[d$edqsub66 =="physics with astrophysics"] <- "Physics"                           
d$degreesubj1[d$edqsub66 =="physics with eltrinics"] <- "Physics"                          
d$degreesubj1[d$edqsub66 =="physiological sciences"] <- "Biological and Agricultural Science"                          
d$degreesubj1[d$edqsub66 =="phyysical education"] <- "Sport Science"                          
d$degreesubj1[d$edqsub66 =="podiatry"] <- "Other health"                          
d$degreesubj1[d$edqsub66 =="political studies"] <- "Political Science"                          
d$degreesubj1[d$edqsub66 =="politics"] <- "Political Science"                          
d$degreesubj1[d$edqsub66 =="politics and government"] <- "Political Science"                          
d$degreesubj1[d$edqsub66 =="politics and history"] <- "Political Science"                          
d$degreesubj1[d$edqsub66 =="politics and modern histo"] <- "Political Science"                          
d$degreesubj1[d$edqsub66 =="politics and sociology"] <- "Political Science"                          
d$degreesubj1[d$edqsub66 =="poloitics"] <- "Political Science"                          
d$degreesubj1[d$edqsub66 =="primary education"] <- "Education"                         
d$degreesubj1[d$edqsub66 =="printing management"] <- "Other"                         
d$degreesubj1[d$edqsub66 =="product design"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="product design\marketing"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="psychology"] <- "Psychology"                         
d$degreesubj1[d$edqsub66 =="psychology and IT"] <-  "Psychology"                         
d$degreesubj1[d$edqsub66 =="psychology and sociology"] <- "Psychology"                          
d$degreesubj1[d$edqsub66 =="psycholoogy"] <- "Psychology"                           
d$degreesubj1[d$edqsub66 =="psycology"] <- "Psychology"                          
d$degreesubj1[d$edqsub66 =="public admin"] <- "Social Policy"                           
d$degreesubj1[d$edqsub66 =="public art and design"] <- "Art"                          
d$degreesubj1[d$edqsub66 =="public relationa and film"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="pyschology"] <- "Psychology"                          
d$degreesubj1[d$edqsub66 =="quantity surveying "] <- "Construction Engineering"                         
d$degreesubj1[d$edqsub66 =="quantity survey"] <- "Construction Engineering"                          
d$degreesubj1[d$edqsub66 =="quantity surveying"] <- "Construction Engineering"                          
d$degreesubj1[d$edqsub66 =="re"] <- "Theology"                          
d$degreesubj1[d$edqsub66 =="religios studies with eng"] <- "Theology"                          
d$degreesubj1[d$edqsub66 =="rural estate management"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="sales and marketing"] <- "Business, Accounting and Finance"                          
d$degreesubj1[d$edqsub66 =="science with management s"] <- "Science"                          
d$degreesubj1[d$edqsub66 =="scince and computer scien"] <- "Science"                          
d$degreesubj1[d$edqsub66 =="social admin"] <- "Social Policy"                          
d$degreesubj1[d$edqsub66 =="social and political scie"] <- "Social Science"                         
d$degreesubj1[d$edqsub66 =="social policy"] <- "Social Policy"                          
d$degreesubj1[d$edqsub66 == "social policy and admin"] <- "Social Policy"                          
d$degreesubj1[d$edqsub66 =="social policy and sociolo"] <- "Social Policy"                          
d$degreesubj1[d$edqsub66 =="social science"] <- "Social Science"                        
d$degreesubj1[d$edqsub66 =="social scince"] <- "Social Science"                          
d$degreesubj1[d$edqsub66 =="social studies"] <- "Social Science"                           
d$degreesubj1[d$edqsub66 =="social work"] <- "Social Policy"                          
d$degreesubj1[d$edqsub66 =="sociology"] <- "Sociology"                          
d$degreesubj1[d$edqsub66 =="sociology and internation"] <- "Sociology"                          
d$degreesubj1[d$edqsub66 =="sociology and sports scie"] <- "Sociology"                          
d$degreesubj1[d$edqsub66 =="software engineering"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 =="soiology"] <- "Sociology"                           
d$degreesubj1[d$edqsub66 =="south east asian"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 ==" south east asian studies"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="spanish /french"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="sport science"] <- "Sport Science"                          
d$degreesubj1[d$edqsub66 =="sports management"] <- "Sport Science"                          
d$degreesubj1[d$edqsub66 =="sports science and busine"] <- "Sport Science"                          
d$degreesubj1[d$edqsub66 =="sports studies"] <- "Sport Science"                         
d$degreesubj1[d$edqsub66 =="ss"] <- "Sport Science"                          
d$degreesubj1[d$edqsub66 =="state management"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="statistics"] <- "Mathematics and Computing"                          
d$degreesubj1[d$edqsub66 =="surveying"] <- "Construction Engineering"                          
d$degreesubj1[d$edqsub66 =="systems analysis"] <- "Engineering"                          
d$degreesubj1[d$edqsub66 =="systems analysis and desi"] <- "Engineering"                          
d$degreesubj1[d$edqsub66 =="teacher education"] <- "Education"                          
d$degreesubj1[d$edqsub66 =="teaching"] <- "Education"                          
d$degreesubj1[d$edqsub66 =="teaching and re"] <- "Education"                          
d$degreesubj1[d$edqsub66 =="teaching design & technol"] <- "Education"                         
d$degreesubj1[d$edqsub66 =="teaching/sports science"] <- "Education"                          
d$degreesubj1[d$edqsub66 =="technology and management"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="technology/business studi"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="telecommunications"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="textile"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="textile design"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="theatre studies"] <- "Performing Arts"                          
d$degreesubj1[d$edqsub66 ==" theatre studies with qts"] <- "Performing Arts"                          
d$degreesubj1[d$edqsub66 ==" theatre with film and tv"] <- "Performing Arts"                          
d$degreesubj1[d$edqsub66 =="theology"] <- "Theology"                           
d$degreesubj1[d$edqsub66 =="timber technology"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="town and country planning"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="town planning"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="toxicology"] <- "Biological and Agricultural Science"                           
d$degreesubj1[d$edqsub66 =="transport and distributio"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="transport management"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="trnasport management and"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="tropical environmental sc"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="urban studies"] <- "Social Science"                          
d$degreesubj1[d$edqsub66 =="veterinary medicine"] <- "Biological and Agricultural Science"                           
d$degreesubj1[d$edqsub66 =="veterinary science"] <- "Biological and Agricultural Science"                           
d$degreesubj1[d$edqsub66 =="vetinary medicine and sur"] <- "Biological and Agricultural Science"                           
d$degreesubj1[d$edqsub66 =="visual communication"] <- "Other"                          
d$degreesubj1[d$edqsub66 =="welsh"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="welsh & linguistics"] <- "Languages and Area Studies"                          
d$degreesubj1[d$edqsub66 =="woven textiles"] <- "Design"                          
d$degreesubj1[d$edqsub66 =="zoo ology"] <- "Biological and Agricultural Science"                           
d$degreesubj1[d$edqsub66 =="zoology"] <- "Biological and Agricultural Science"                           
d$degreesubj1[d$edqsub66 =="zoology and physiology"] <- "Biological and Agricultural Science"
d$degreesubj1 <-as.factor(d$degreesubj1)
d$degreesub <-recode(d$degreesubj1, "'Aerospace Engineering'=1 ;'American Studies'=2; 'Architecture'=1; 'Art'=2 ; 'Arts and Humanities'=2;
			'Biological and Agricultural Science'=3;'Business, Accounting and Finance'=4;'Chemical Engineering'=1;'Chemistry'=3;
			'Civil Engineering'=1;'Classics'=2;'Construction Engineering'=1;'Criminology'=4; 'Cultural Studies'=2; 'Design'=7;'Economics'=4;
			'Education'=4;'Electronic and Electrical Engineering'=1;'Engineering'=1;'English'=2;'Environmental Science'=3;'Geography'=4;
			'Geology'=3;'History and Archaeology'=2;'Languages and Area Studies'=2;'law'=4;'Manufacturing Engineering'=1;'Mathematics and Computing'=5;
			'Mechanical Engineering'=1;'Medicine and Dentistry'=6;'Music'=2;'Natural Sciences'=3;'None'=0;'Nursing'=7;'Other'=7;'Other health'=7;
			'Performing Arts'=2;'Philosophy'=2;'Physics'=3;'Political Science'=4;'Psychology'=4;'Science'=3;'Social Policy'=4;'Social Science'=4;
			'Sociology'=4;'Sport Science'=3;'Theology'=2")
d$degree <-recode(d$degreesub,"0=0;1:7=1")

# Professional Qualification
summary(d$edqsub71)
d$edqsub71 <-as.factor(d$edqsub71)
d$edqsub71 <-as.numeric(d$edqsub71)
d$prof <-recode(d$edqsub71,"1=0;2:489=1;NA=0")

#NVQ Level 4/5
summary(d$NVQACA00)
d$NVQ <-NA
d$NVQ[d$obs30 ==1] <-0
d$NVQ <-as.numeric(d$NVQACA00=="NVQ Level 4"|d$NVQACA00=="NVQ Level 5")
summary(d$NVQ)
# Higher education Diploma
summary(d$eddiped) 
d$highereddip<-NA
d$highereddip[d$obs30 ==1] <-0
d$highereddip <-recode(d$eddiped, "'Year'=1; 'Don t know'=0; NA=0")
d$highereddip[d$highereddip=="=Not answered"] <-NA
summary(d$highereddip)
d$highereddip <-as.integer(d$highereddip==1)



# A-levels

# Generate A-level subject variables

d$alsubj1 <-NA
d$alsubj2 <-NA
d$alsubj3 <-NA
d$alsubj4 <-NA
d$alsubj5 <-NA
d$alsubj6 <-NA
d$alsubj7 <-NA
d$alsubj8 <-NA
d$alsubj9 <-NA
d$alsubj10 <-NA

# A-level subject 1
d$alsubj1<-NA
d$alsubj1[d$edqsub56=="ACCOUNT AND BUSINESS"] <-1
d$alsubj1[d$edqsub56=="ACCOUNTANCY"] <-1
d$alsubj1[d$edqsub56=="accountancy"] <-1
d$alsubj1[d$edqsub56=="Accountancy"] <-1
d$alsubj1[d$edqsub56=="accountancy"] <-1
d$alsubj1[d$edqsub56=="Accounting"] <-1
d$alsubj1[d$edqsub56=="Accounts"] <-1
d$alsubj1[d$edqsub56=="accounts"] <-1
d$alsubj1[d$edqsub56=="ACCOUNTS"] <-1
d$alsubj1[d$edqsub56=="accounts(business studies"] <-1
d$alsubj1[d$edqsub56=="acounts"] <-1
d$alsubj1[d$edqsub56=="ancient greek"] 		<-2
d$alsubj1[d$edqsub56=="ancient history"] <-3
d$alsubj1[d$edqsub56=="ANCIENT HISTORY"] <-3
d$alsubj1[d$edqsub56=="Ancient History"] <-3
d$alsubj1[d$edqsub56=="ANCIENT HISTORYU"] <-3
d$alsubj1[d$edqsub56=="archaeology"] <-4
d$alsubj1[d$edqsub56=="Archaeology"] <-4
d$alsubj1[d$edqsub56=="2 dimensional art"] <-5
d$alsubj1[d$edqsub56=="art"] <-5
d$alsubj1[d$edqsub56=="3 dimensional art"] <-5
d$alsubj1[d$edqsub56=="Art"] <-5
d$alsubj1[d$edqsub56=="ART"] <-5
d$alsubj1[d$edqsub56=="ARTS"] <-5
d$alsubj1[d$edqsub56=="fine art"] <-5
d$alsubj1[d$edqsub56=="FINE ART"] <-5
d$alsubj1[d$edqsub56=="STUDY OF ART"] <-5
d$alsubj1[d$edqsub56=="Art & Craft"] <-5
d$alsubj1[d$edqsub56=="Art & Design"] <-5
d$alsubj1[d$edqsub56=="art & design technology"] <-5
d$alsubj1[d$edqsub56=="ART 7 DESIGN"] <-5
d$alsubj1[d$edqsub56=="ART AND ART HISTORY"] <-5
d$alsubj1[d$edqsub56=="Art and Art History"] <-5
d$alsubj1[d$edqsub56=="art and crafts"] <-5
d$alsubj1[d$edqsub56=="Art and design"] <-5
d$alsubj1[d$edqsub56=="ART AND DESIGN"] <-5
d$alsubj1[d$edqsub56=="art/design"] <-5
d$alsubj1[d$edqsub56=="art history"] <-5
d$alsubj1[d$edqsub56=="Art History"] <-5
d$alsubj1[d$edqsub56=="art with art history"] <-5
d$alsubj1[d$edqsub56=="ART WITH ART HISTORY"] <-5
d$alsubj1[d$edqsub56=="art/art history"] <-5
d$alsubj1[d$edqsub56=="Art/Art History"] <-5
d$alsubj1[d$edqsub56=="history of aft"] <-5
d$alsubj1[d$edqsub56=="History of art"] <-5
d$alsubj1[d$edqsub56=="History of Art"] <-5
d$alsubj1[d$edqsub56=="bilogy"] <-6
d$alsubj1[d$edqsub56=="biol"] <-6
d$alsubj1[d$edqsub56=="biol;gy"] <-6
d$alsubj1[d$edqsub56=="Biology"] <-6
d$alsubj1[d$edqsub56=="biology"] <-6
d$alsubj1[d$edqsub56=="BIOLOGY"] <-6
d$alsubj1[d$edqsub56=="biology  c"] <-6
d$alsubj1[d$edqsub56=="Biology - retake"] <-6
d$alsubj1[d$edqsub56=="boilogy"] <-6
d$alsubj1[d$edqsub56=="BOTTANY"] <-6
d$alsubj1[d$edqsub56=="practical biology"] <-6
d$alsubj1[d$edqsub56=="theoretical biology"] <-6
d$alsubj1[d$edqsub56=="biology s level"] <-7
d$alsubj1[d$edqsub56=="buisiness studies"] <-11
d$alsubj1[d$edqsub56=="BUISNESS STUDIES"] <-11
d$alsubj1[d$edqsub56=="BUISNESS STUDIES"] <-11
d$alsubj1[d$edqsub56=="buisness studies"] <-11
d$alsubj1[d$edqsub56=="BUISNESS STUDIES"] <-11
d$alsubj1[d$edqsub56=="business"] <-11
d$alsubj1[d$edqsub56=="Business Studies"] <-11
d$alsubj1[d$edqsub56=="BUSINESS STUDIES BIOLOGY"] <-11
d$alsubj1[d$edqsub56=="Business SudiesInform"] <-11
d$alsubj1[d$edqsub56=="CEMISTERY"] <-12
d$alsubj1[d$edqsub56=="CHE M"] <-12
d$alsubj1[d$edqsub56=="CHEM"] <-12
d$alsubj1[d$edqsub56=="Chem"] <-12
d$alsubj1[d$edqsub56=="chem"] <-12
d$alsubj1[d$edqsub56=="chemestry"] <-12
d$alsubj1[d$edqsub56=="CHEMISRTY"] <-12
d$alsubj1[d$edqsub56=="chemisrty"] <-12
d$alsubj1[d$edqsub56=="CHEMISTERY"] <-12
d$alsubj1[d$edqsub56=="chemistrry"] <-12
d$alsubj1[d$edqsub56=="Chemistry"] <-12
d$alsubj1[d$edqsub56=="CHEMISTRY"] <-12
d$alsubj1[d$edqsub56=="Chemistry - retake"] <-12
d$alsubj1[d$edqsub56=="chemistry (s)"] <-12
d$alsubj1[d$edqsub56=="CHEMISTRY A LEVEL"] <-12
d$alsubj1[d$edqsub56=="chemistyr"] <-12
d$alsubj1[d$edqsub56=="CHEMISTYR"] <-12
d$alsubj1[d$edqsub56=="CHEMSTRY"] <-12
d$alsubj1[d$edqsub56=="CHENISTRY"] <-12
d$alsubj1[d$edqsub56=="Chemistry S level"] <-13
d$alsubj1[d$edqsub56=="chemistry s level"] <-13
d$alsubj1[d$edqsub56=="Chemistry -S level"] <-13
d$alsubj1[d$edqsub56=="s' level chemestry"] <-13
d$alsubj1[d$edqsub56=="Special Chemistry"] <-13
d$alsubj1[d$edqsub56=="clasical civilisation"] <-14
d$alsubj1[d$edqsub56=="clasics"] <-14
d$alsubj1[d$edqsub56=="classical civilations"] <-14
d$alsubj1[d$edqsub56=="classical civilisation"] <-14
d$alsubj1[d$edqsub56=="CLASSICAL CIVILISATION"] <-14
d$alsubj1[d$edqsub56=="CLASSICAL CIVILISATIONS"] <-14
d$alsubj1[d$edqsub56=="CLASSICAL CIVILIZATION"] <-14
d$alsubj1[d$edqsub56=="CLASSICAL STUDIES"] <-14
d$alsubj1[d$edqsub56=="CLASSICS"] <-15
d$alsubj1[d$edqsub56=="COMMUNICATION STUDIES"] <-16
d$alsubj1[d$edqsub56=="communication studies"] <-16
d$alsubj1[d$edqsub56=="COMMUNICATIONS"] <-16
d$alsubj1[d$edqsub56=="COMMUNICATIONS STUDIES"] <-16
d$alsubj1[d$edqsub56=="Communications studies"] <-16
d$alsubj1[d$edqsub56=="applied computer science"] <-17
d$alsubj1[d$edqsub56=="comp studies"] <-17
d$alsubj1[d$edqsub56=="COMPTUTING SKILLS"] <-17
d$alsubj1[d$edqsub56=="COMPUTER PROGRAMMING"] <-17
d$alsubj1[d$edqsub56=="Computer Science"] <-17
d$alsubj1[d$edqsub56=="COMPUTER SCIENCE"] <-17
d$alsubj1[d$edqsub56=="computer science"] <-17
d$alsubj1[d$edqsub56=="computer sciences"] <-17
d$alsubj1[d$edqsub56=="Computer Sciencse"] <-17
d$alsubj1[d$edqsub56=="COMPUTER SICENCE"] <-17
d$alsubj1[d$edqsub56=="Computer Studies"] <-17
d$alsubj1[d$edqsub56=="Computer Studies"] <-17
d$alsubj1[d$edqsub56=="computer studies"] <-17
d$alsubj1[d$edqsub56=="Computer studies"] <-17
d$alsubj1[d$edqsub56=="computing"] <-17
d$alsubj1[d$edqsub56=="Computing"] <-17
d$alsubj1[d$edqsub56=="coputer science"] <-17
d$alsubj1[d$edqsub56=="information Technology"] <-17
d$alsubj1[d$edqsub56=="IT"] <-17
d$alsubj1[d$edqsub56=="Computer science S level"] <-18
d$alsubj1[d$edqsub56=="craft design and technolo"] <-19
d$alsubj1[d$edqsub56=="Design"] <-19
d$alsubj1[d$edqsub56=="design"] <-19
d$alsubj1[d$edqsub56=="DESIGN"] <-19
d$alsubj1[d$edqsub56=="dESIGN & tECHNOLGY"] <-19
d$alsubj1[d$edqsub56=="Design & Technology"] <-19
d$alsubj1[d$edqsub56=="design and technology"] <-19
d$alsubj1[d$edqsub56=="Design and Technology"] <-19
d$alsubj1[d$edqsub56=="design craft and technolo"] <-19
d$alsubj1[d$edqsub56=="design technology"] <-19
d$alsubj1[d$edqsub56=="DESIGN TECHNOLOGY"] <-19
d$alsubj1[d$edqsub56=="c.d.t"] <-19
d$alsubj1[d$edqsub56=="technology"] <-19
d$alsubj1[d$edqsub56=="Technology"] <-19
d$alsubj1[d$edqsub56=="DRAMA"] <-20
d$alsubj1[d$edqsub56=="Drama"] <-20
d$alsubj1[d$edqsub56=="drama and theatre arts"] <-20
d$alsubj1[d$edqsub56=="dance"] <-20
d$alsubj1[d$edqsub56=="Dance and Drama"] <-20
d$alsubj1[d$edqsub56=="ECCONOMICS"] <-21
d$alsubj1[d$edqsub56=="ecomics"] <-21
d$alsubj1[d$edqsub56=="ECOMICS"] <-21
d$alsubj1[d$edqsub56=="ecomincs"] <-21
d$alsubj1[d$edqsub56=="Ecomonics"] <-21
d$alsubj1[d$edqsub56=="ecomopmics"] <-21
d$alsubj1[d$edqsub56=="econ"] <-21
d$alsubj1[d$edqsub56=="ECON"] <-21
d$alsubj1[d$edqsub56=="ECONIICS"] <-21
d$alsubj1[d$edqsub56=="Econimics"] <-21
d$alsubj1[d$edqsub56=="econimics"] <-21
d$alsubj1[d$edqsub56=="Econimins"] <-21
d$alsubj1[d$edqsub56=="Econmics"] <-21
d$alsubj1[d$edqsub56=="econo;mics"] <-21
d$alsubj1[d$edqsub56=="ECONOMIC"] <-21
d$alsubj1[d$edqsub56=="Economic"] <-21
d$alsubj1[d$edqsub56=="economic and social histo"] <-21
d$alsubj1[d$edqsub56=="economices"] <-21
d$alsubj1[d$edqsub56=="economics"] <-21
d$alsubj1[d$edqsub56=="Economics"] <-21
d$alsubj1[d$edqsub56=="ECONOMICS"] <-21
d$alsubj1[d$edqsub56=="economics & politics"] <-21
d$alsubj1[d$edqsub56=="Economics & World Affairs"] <-21
d$alsubj1[d$edqsub56=="economics with politics"] <-21
d$alsubj1[d$edqsub56=="economicse"] <-21
d$alsubj1[d$edqsub56=="economis and world affair"] <-21
d$alsubj1[d$edqsub56=="Ecvonomics"] <-21
d$alsubj1[d$edqsub56=="encominics"] <-21
d$alsubj1[d$edqsub56=="ECONOMICS AT S LEVEL"] <-22
d$alsubj1[d$edqsub56=="Electronic Systems"] <-23
d$alsubj1[d$edqsub56=="ELECTRONIC\S#"] <-23
d$alsubj1[d$edqsub56=="eLECTRONICS"] <-23
d$alsubj1[d$edqsub56=="Electronics"] <-23
d$alsubj1[d$edqsub56=="electronics"] <-23
d$alsubj1[d$edqsub56=="ELECTRONICS"] <-23
d$alsubj1[d$edqsub56=="Electronics"] <-23
d$alsubj1[d$edqsub56=="electronics/statistics"] <-23
d$alsubj1[d$edqsub56=="microelectronics"] <-23
d$alsubj1[d$edqsub56=="ENGINEERING"] <-24
d$alsubj1[d$edqsub56=="ENGINEERING DRAWING"] <-24
d$alsubj1[d$edqsub56=="Engineering Drawing"] <-24
d$alsubj1[d$edqsub56=="Engineering drawing"] <-24
d$alsubj1[d$edqsub56=="engineering drawing"] <-24
d$alsubj1[d$edqsub56=="ENGINEERING DRAWING AND D"] <-24
d$alsubj1[d$edqsub56=="ENGINEERING METALWORK"] <-24
d$alsubj1[d$edqsub56=="ENGINEERING SCIENCE"] <-24
d$alsubj1[d$edqsub56=="Geometric and Engineering"] <-24
d$alsubj1[d$edqsub56=="combined english"] <-25
d$alsubj1[d$edqsub56=="ebglish"] <-25
d$alsubj1[d$edqsub56=="En g Lit"] <-25
d$alsubj1[d$edqsub56=="eng"] <-25
d$alsubj1[d$edqsub56=="ENG"] <-25
d$alsubj1[d$edqsub56=="ENG .LIT"] <-25
d$alsubj1[d$edqsub56=="eng lang"] <-25
d$alsubj1[d$edqsub56=="ENG LANG"] <-25
d$alsubj1[d$edqsub56=="Eng Lang"] <-25
d$alsubj1[d$edqsub56=="eng language/literature"] <-25
d$alsubj1[d$edqsub56=="ENG LIT"] <-25
d$alsubj1[d$edqsub56=="eng lit"] <-25
d$alsubj1[d$edqsub56=="Eng lit"] <-25
d$alsubj1[d$edqsub56=="eng lit."] <-25
d$alsubj1[d$edqsub56=="eng Slevel"] <-25
d$alsubj1[d$edqsub56=="Eng. Lit"] <-25
d$alsubj1[d$edqsub56=="ENG. LIT"] <-25
d$alsubj1[d$edqsub56=="Eng. Lit."] <-25
d$alsubj1[d$edqsub56=="ENG.LIT 1"] <-25
d$alsubj1[d$edqsub56=="eng.lit."] <-25
d$alsubj1[d$edqsub56=="eng/language."] <-25
d$alsubj1[d$edqsub56=="engl"] <-25
d$alsubj1[d$edqsub56=="English"] <-25
d$alsubj1[d$edqsub56=="ENGLISH"] <-25
d$alsubj1[d$edqsub56=="english"] <-25
d$alsubj1[d$edqsub56=="English  lit."] <-25
d$alsubj1[d$edqsub56=="English  lit."] <-25
d$alsubj1[d$edqsub56=="English (Literature)"] <-25
d$alsubj1[d$edqsub56=="ENGLISH ;LITERATURE"] <-25
d$alsubj1[d$edqsub56=="ENGLISH LANG"] <-25
d$alsubj1[d$edqsub56=="english lang"] <-25
d$alsubj1[d$edqsub56=="ENGLISH LANG & LIT"] <-25
d$alsubj1[d$edqsub56=="English Lang and Lit"] <-25
d$alsubj1[d$edqsub56=="English Lang."] <-25
d$alsubj1[d$edqsub56=="english lang.& lit."] <-25
d$alsubj1[d$edqsub56=="English lang/lit"] <-25
d$alsubj1[d$edqsub56=="ENGLISH LANG/LIT"] <-25
d$alsubj1[d$edqsub56=="english language"] <-25
d$alsubj1[d$edqsub56=="English Language"] <-25
d$alsubj1[d$edqsub56=="english language"] <-25
d$alsubj1[d$edqsub56=="ENGLISH LANGUAGE"] <-25
d$alsubj1[d$edqsub56=="English language"] <-25
d$alsubj1[d$edqsub56=="english Language"] <-25
d$alsubj1[d$edqsub56=="English language & Litera"] <-25
d$alsubj1[d$edqsub56=="english language & litera"] <-25
d$alsubj1[d$edqsub56=="ENGLISH LANGUAGE AND LIT"] <-25
d$alsubj1[d$edqsub56=="ENGLISH LANGUAGE AND LITE"] <-25
d$alsubj1[d$edqsub56=="english language/literatu"] <-25
d$alsubj1[d$edqsub56=="english lit"] <-25
d$alsubj1[d$edqsub56=="ENGLISH LIT"] <-25
d$alsubj1[d$edqsub56=="English Lit"] <-25
d$alsubj1[d$edqsub56=="english lit and lang"] <-25
d$alsubj1[d$edqsub56=="ENGLISH LIT AND LANGUAGE"] <-25
d$alsubj1[d$edqsub56=="english lit."] <-25
d$alsubj1[d$edqsub56=="English lit."] <-25
d$alsubj1[d$edqsub56=="ENGLISH LIT."] <-25
d$alsubj1[d$edqsub56=="English lit/lang"] <-25
d$alsubj1[d$edqsub56=="english litand language"] <-25
d$alsubj1[d$edqsub56=="english litature"] <-25
d$alsubj1[d$edqsub56=="ENGLISH LITERATURE"] <-25
d$alsubj1[d$edqsub56=="English Literature"] <-25
d$alsubj1[d$edqsub56=="english literature"] <-25
d$alsubj1[d$edqsub56=="English literature"] <-25
d$alsubj1[d$edqsub56=="English Literature & Lang"] <-25
d$alsubj1[d$edqsub56=="ENGLISH LITERATURE & LANG"] <-25
d$alsubj1[d$edqsub56=="English Literature/Lang."] <-25
d$alsubj1[d$edqsub56=="English Litereature"] <-25
d$alsubj1[d$edqsub56=="ENGLISH LITERTURA"] <-25
d$alsubj1[d$edqsub56=="English Litterature"] <-25
d$alsubj1[d$edqsub56=="english not specific"] <-25
d$alsubj1[d$edqsub56=="ENLISH"] <-25
d$alsubj1[d$edqsub56=="ENLISH LANGUAGE/LITERATUR"] <-25
d$alsubj1[d$edqsub56=="Environmental Sc"] <-62
d$alsubj1[d$edqsub56=="environmental science"] <-62
d$alsubj1[d$edqsub56=="Environmental Studies"] <-62
d$alsubj1[d$edqsub56=="Fashion"] <-52
d$alsubj1[d$edqsub56=="fashion"] <-52
d$alsubj1[d$edqsub56=="Fashion & textiles"] <-52
d$alsubj1[d$edqsub56=="fashion and design"] <-52
d$alsubj1[d$edqsub56=="fashion and fabric"] <-52
d$alsubj1[d$edqsub56=="Fashion design"] <-52
d$alsubj1[d$edqsub56=="film studies"]<-26
d$alsubj1[d$edqsub56=="FILM STUDIES"] <-26
d$alsubj1[d$edqsub56=="freanch"] <-27
d$alsubj1[d$edqsub56=="frech"	] <-27
d$alsubj1[d$edqsub56=="FRENCH"] <-27
d$alsubj1[d$edqsub56=="french"] <-27
d$alsubj1[d$edqsub56=="French"] <-27
d$alsubj1[d$edqsub56=="french for business"] <-27
d$alsubj1[d$edqsub56=="french lang"]<-27		
d$alsubj1[d$edqsub56=="French Literature"] <-27
d$alsubj1[d$edqsub56=="FRENCH1"] <-27
d$alsubj1[d$edqsub56=="French S level"] <-28
d$alsubj1[d$edqsub56=="Furhther Maths"] <-29
d$alsubj1[d$edqsub56=="further math"] <-29
d$alsubj1[d$edqsub56=="further mathematics"] <-29
d$alsubj1[d$edqsub56=="Further mathematics"] <-29
d$alsubj1[d$edqsub56=="FURTHER MATHEMATICS"] <-29
d$alsubj1[d$edqsub56=="Further Mathematics"] <-29
d$alsubj1[d$edqsub56=="further maths"] <-29
d$alsubj1[d$edqsub56=="Further Maths"] <-29
d$alsubj1[d$edqsub56=="Futher maths"] <-29
d$alsubj1[d$edqsub56=="FURTHER MATHS"] <-29
d$alsubj1[d$edqsub56=="FURTHER MATH"] <-29
d$alsubj1[d$edqsub56=="Further Maths - Pure and"] <-29
d$alsubj1[d$edqsub56=="FURTHER MATHS A LEVEL"] <-29
d$alsubj1[d$edqsub56=="FUTHER MATHS"] <-29
d$alsubj1[d$edqsub56=="further maths (s)"] <-30
d$alsubj1[d$edqsub56=="FURTHER MATHS S LEVEL"] <-30
d$alsubj1[d$edqsub56=="FURTHER MATHS STEP"] <-30
d$alsubj1[d$edqsub56=="S level further maths"] <-30
d$alsubj1[d$edqsub56=="GEN STUD"] <-31
d$alsubj1[d$edqsub56=="gen stud"] <-31
d$alsubj1[d$edqsub56=="gen studies"] <-31
d$alsubj1[d$edqsub56=="GEN STUDIES"] <-31
d$alsubj1[d$edqsub56=="Gen studies"] <-31
d$alsubj1[d$edqsub56=="Gen Studies"] <-31
d$alsubj1[d$edqsub56=="GEN STUDIES RELIGIOUS STU"] <-31
d$alsubj1[d$edqsub56=="gen. studies"] <-31
d$alsubj1[d$edqsub56=="gen.studies"] <-31
d$alsubj1[d$edqsub56=="general"] <-31
d$alsubj1[d$edqsub56=="GENERAL"] <-31
d$alsubj1[d$edqsub56=="general   studies"] <-31
d$alsubj1[d$edqsub56=="general  tudies"] <-31
d$alsubj1[d$edqsub56=="general knowl;edfge"] <-31
d$alsubj1[d$edqsub56=="GENERAL STIUDIES"] <-31
d$alsubj1[d$edqsub56=="GENERAL STUDIES"] <-31
d$alsubj1[d$edqsub56=="general studies"] <-31
d$alsubj1[d$edqsub56=="General studies"] <-31
d$alsubj1[d$edqsub56=="General Studies"] <-31
d$alsubj1[d$edqsub56=="GENERAL STUDY"] <-31
d$alsubj1[d$edqsub56=="general study"] <-31
d$alsubj1[d$edqsub56=="general studys"] <-31
d$alsubj1[d$edqsub56=="Genereal Studies"] <-31
d$alsubj1[d$edqsub56=="genstudies"] <-31
d$alsubj1[d$edqsub56=="1GEOGRAPHY"] <-32
d$alsubj1[d$edqsub56=="gegraphy"] <-32
d$alsubj1[d$edqsub56=="GEGRAPHY"] <-32
d$alsubj1[d$edqsub56=="geoagraphy"] <-32
d$alsubj1[d$edqsub56=="geog"] <-32
d$alsubj1[d$edqsub56=="Geog"] <-32
d$alsubj1[d$edqsub56=="GEOG"] <-32
d$alsubj1[d$edqsub56=="GEOGHRAY"] <-32
d$alsubj1[d$edqsub56=="geogr"] <-32
d$alsubj1[d$edqsub56=="GEOGRAGHY"] <-32
d$alsubj1[d$edqsub56=="GEOGRAHY"] <-32
d$alsubj1[d$edqsub56=="geographt"] <-32
d$alsubj1[d$edqsub56=="GEOGRAPHY"] <-32
d$alsubj1[d$edqsub56=="Geography"] <-32
d$alsubj1[d$edqsub56=="geography"] <-32
d$alsubj1[d$edqsub56=="geography grade d"] <-32
d$alsubj1[d$edqsub56=="geographyy"] <-32
d$alsubj1[d$edqsub56=="geograqphy"] <-32
d$alsubj1[d$edqsub56=="geophraphy"] <-32
d$alsubj1[d$edqsub56=="gepgraphy"] <-32
d$alsubj1[d$edqsub56=="GOEG"] <-32
d$alsubj1[d$edqsub56=="goegraphy"] <-32
d$alsubj1[d$edqsub56=="goegraphy"] <-32
d$alsubj1[d$edqsub56=="geog   s level"] <-33
d$alsubj1[d$edqsub56=="geog s level"] <-33
d$alsubj1[d$edqsub56=="GEOGRAPHY S LEVEL"] <-33
d$alsubj1[d$edqsub56=="geography s level"] <-33
d$alsubj1[d$edqsub56=="geology"] <-34
d$alsubj1[d$edqsub56=="Geology"] <-34
d$alsubj1[d$edqsub56=="GEOLOGY"] <-34
d$alsubj1[d$edqsub56=="German"] <-35
d$alsubj1[d$edqsub56=="german"] <-35
d$alsubj1[d$edqsub56=="GERMAN"] <-35
d$alsubj1[d$edqsub56=="German S level"] <-35
d$alsubj1[d$edqsub56=="German."] <-35
d$alsubj1[d$edqsub56=="gevernment politics"] <-36
d$alsubj1[d$edqsub56=="govenment and politics"] <-36
d$alsubj1[d$edqsub56=="GOVERNMENT"] <-36
d$alsubj1[d$edqsub56=="Government & politics"] <-36
d$alsubj1[d$edqsub56=="GOVERNMENT & POLITICS"] <-36
d$alsubj1[d$edqsub56=="GOVERNMENT & POLITICS"] <-36
d$alsubj1[d$edqsub56=="GOVERNMENT AND POLITICAL"] <-36
d$alsubj1[d$edqsub56=="GOVERNMENT AND POLITICS"] <-36
d$alsubj1[d$edqsub56=="government and politics"] <-36
d$alsubj1[d$edqsub56=="Government and Politics"] <-36
d$alsubj1[d$edqsub56=="GOVERNMENT POLITICS"] <-36
d$alsubj1[d$edqsub56=="governmental politics"] <-36
d$alsubj1[d$edqsub56=="Govrnment and politics"] <-36
d$alsubj1[d$edqsub56=="Govt and politics"] <-36
d$alsubj1[d$edqsub56=="GOVT AND POLITICS"] <-36
d$alsubj1[d$edqsub56=="GOVT. AND POLITICS"] <-36
d$alsubj1[d$edqsub56=="govt/politics"] <-36
d$alsubj1[d$edqsub56=="GRAPHIC \DESIGN"] <-37
d$alsubj1[d$edqsub56=="GRAPHIC DESIGN"] <-37
d$alsubj1[d$edqsub56=="Graphic Design"] <-37
d$alsubj1[d$edqsub56=="graphic design"] <-37
d$alsubj1[d$edqsub56=="graphical communication"] <-37
d$alsubj1[d$edqsub56=="Graphical communication"] <-37
d$alsubj1[d$edqsub56=="gre ke"] <-38
d$alsubj1[d$edqsub56=="GREEK"] <-38
d$alsubj1[d$edqsub56=="greek"] <-38
d$alsubj1[d$edqsub56== "MODERN GREEK"] <-38
d$alsubj1[d$edqsub56==";history"] <-39
d$alsubj1[d$edqsub56=="19 centuary british and e"] <-39
d$alsubj1[d$edqsub56=="American History"] <-39
d$alsubj1[d$edqsub56=="HIDTORY"] <-39
d$alsubj1[d$edqsub56=="hist"] <-39
d$alsubj1[d$edqsub56=="History"] <-39
d$alsubj1[d$edqsub56=="HISTORY"] <-39
d$alsubj1[d$edqsub56=="history"] <-39
d$alsubj1[d$edqsub56=="History (modern)"] <-39
d$alsubj1[d$edqsub56=="History."] <-39
d$alsubj1[d$edqsub56=="Histoy"] <-39
d$alsubj1[d$edqsub56=="histroy"] <-39
d$alsubj1[d$edqsub56=="medeaevil history"] <-39
d$alsubj1[d$edqsub56=="MEDIEVAL HISTORY"] <-39
d$alsubj1[d$edqsub56=="MODERN HISTORY"] <-39
d$alsubj1[d$edqsub56=="Social & Economic History"] <-39
d$alsubj1[d$edqsub56=="Social and economic histo"] <-39
d$alsubj1[d$edqsub56=="HISTORY S LEVEL"] <-40
d$alsubj1[d$edqsub56=="history S level"] <-40
d$alsubj1[d$edqsub56=="hum,an bilogy"] <-62
d$alsubj1[d$edqsub56=="human  biology"] <-62
d$alsubj1[d$edqsub56=="human biology"] <-62
d$alsubj1[d$edqsub56=="Human biology"] <-62
d$alsubj1[d$edqsub56=="Human Biology"] <-62
d$alsubj1[d$edqsub56=="human physiology"] <-62
d$alsubj1[d$edqsub56=="HUMAN BIOLOGY"] <-62
d$alsubj1[d$edqsub56=="HUMAN PHYSIOLOGY"] <-62
d$alsubj1[d$edqsub56=="humanbiology"] <-62
d$alsubj1[d$edqsub56=="humanphysiology"] <-62
d$alsubj1[d$edqsub56=="industrila studies"] <-41
d$alsubj1[d$edqsub56=="Industrial Studies"] <-41
d$alsubj1[d$edqsub56=="Italian"] <-42
d$alsubj1[d$edqsub56=="LATIN"] <-43
d$alsubj1[d$edqsub56=="latin"] <-43
d$alsubj1[d$edqsub56=="Latin"] <-43
d$alsubj1[d$edqsub56=="Latin S level"] <-44
d$alsubj1[d$edqsub56=="latin s level"] <-44
d$alsubj1[d$edqsub56=="LATIN SPECIAL"] <-44
d$alsubj1[d$edqsub56=="English Law."] <-45
d$alsubj1[d$edqsub56=="criminal law"] <-45
d$alsubj1[d$edqsub56=="Law"] <-45
d$alsubj1[d$edqsub56=="law"] <-45
d$alsubj1[d$edqsub56=="LAW"] <-45
d$alsubj1[d$edqsub56=="low"] <-45
d$alsubj1[d$edqsub56=="applied and pure maths"] <-46
d$alsubj1[d$edqsub56=="Applied Mathematics"] <-46
d$alsubj1[d$edqsub56=="applied mathematics"] <-46
d$alsubj1[d$edqsub56=="APPLIED MATHS"] <-46
d$alsubj1[d$edqsub56=="applied maths"] <-46
d$alsubj1[d$edqsub56=="Applied Maths"] <-46
d$alsubj1[d$edqsub56=="combined maths"] <-46
d$alsubj1[d$edqsub56=="Maaths"] <-46
d$alsubj1[d$edqsub56=="Matematics"] <-46
d$alsubj1[d$edqsub56=="MATH"] <-46
d$alsubj1[d$edqsub56=="math"] <-46
d$alsubj1[d$edqsub56=="Math & General knowladge"] <-46
d$alsubj1[d$edqsub56=="Mathematics"] <-46
d$alsubj1[d$edqsub56=="mATHEMATICS"] <-46
d$alsubj1[d$edqsub56=="MATHEMATICS"] <-46
d$alsubj1[d$edqsub56=="mathematics"] <-46
d$alsubj1[d$edqsub56=="MATHEMATICS - PURE/APLIED"] <-46
d$alsubj1[d$edqsub56=="mathematics and art"] <-46
d$alsubj1[d$edqsub56=="Mathematics and Statistic"] <-46
d$alsubj1[d$edqsub56=="Mathematics with stats"] <-46
d$alsubj1[d$edqsub56=="mathematics, pure and app"] <-46
d$alsubj1[d$edqsub56=="MATHMATICS AND STATISTICS"] <-46
d$alsubj1[d$edqsub56=="Maths"] <-46
d$alsubj1[d$edqsub56=="maths"] <-46
d$alsubj1[d$edqsub56=="MATHS"] <-46
d$alsubj1[d$edqsub56=="maths & mechanics"] <-46
d$alsubj1[d$edqsub56=="Maths & Statistics"] <-46
d$alsubj1[d$edqsub56=="maths & statistics"] <-46
d$alsubj1[d$edqsub56=="Maths (pure and Applied)"] <-46
d$alsubj1[d$edqsub56=="Maths /pure and applied"] <-46
d$alsubj1[d$edqsub56=="maths + stats"] <-46
d$alsubj1[d$edqsub56=="MATHS A LEVEL"] <-46
d$alsubj1[d$edqsub56=="maths an"] <-46
d$alsubj1[d$edqsub56=="MATHS AND STATISTICS"] <-46
d$alsubj1[d$edqsub56=="maths and statistics"] <-46
d$alsubj1[d$edqsub56=="Maths and stats"] <-46
d$alsubj1[d$edqsub56=="MATHS AND STATS"] <-46
d$alsubj1[d$edqsub56=="maths AS"] <-46
d$alsubj1[d$edqsub56=="maths pure"] <-46
d$alsubj1[d$edqsub56=="maths pure and applied"] <-46
d$alsubj1[d$edqsub56=="MATHS- PURE AND APPLIED"] <-46
d$alsubj1[d$edqsub56=="Maths pure l& applied"] <-46
d$alsubj1[d$edqsub56=="MATHS S LEVEL"] <-46
d$alsubj1[d$edqsub56=="MATHS WITH STATISTICS"] <-46
d$alsubj1[d$edqsub56=="maths with statistics"] <-46
d$alsubj1[d$edqsub56=="maths with stats"] <-46
d$alsubj1[d$edqsub56=="Maths with stats."] <-46
d$alsubj1[d$edqsub56=="MATHS, PURE AND APPLIED"] <-46
d$alsubj1[d$edqsub56=="maths."] <-46
d$alsubj1[d$edqsub56=="MATHS."] <-46
d$alsubj1[d$edqsub56=="Maths."] <-46
d$alsubj1[d$edqsub56=="Maths/pure and applied"] <-46
d$alsubj1[d$edqsub56=="Maths/Statistics"] <-46
d$alsubj1[d$edqsub56=="MATHSW"] <-46
d$alsubj1[d$edqsub56=="Mathsw"] <-46
d$alsubj1[d$edqsub56=="mechanics"] <-46
d$alsubj1[d$edqsub56=="MMaths"] <-46
d$alsubj1[d$edqsub56=="PURE & APPL MATHS"] <-46
d$alsubj1[d$edqsub56=="Pure & Applied Maths"] <-46
d$alsubj1[d$edqsub56=="pure and applied maths"] <-46
d$alsubj1[d$edqsub56=="PURE AND APPLIED MATHS"] <-46
d$alsubj1[d$edqsub56=="Pure M aths & Statistics"] <-46
d$alsubj1[d$edqsub56=="pure mathematics"] <-46
d$alsubj1[d$edqsub56=="PURE MATHEMATICS"] <-46
d$alsubj1[d$edqsub56=="pure mathematics"] <-46
d$alsubj1[d$edqsub56=="pure maths"] <-46
d$alsubj1[d$edqsub56=="PURE MATHS"] <-46
d$alsubj1[d$edqsub56=="Pure maths"] <-46
d$alsubj1[d$edqsub56=="Pure Maths"] <-46
d$alsubj1[d$edqsub56=="Pure Maths & Mechanics"] <-46
d$alsubj1[d$edqsub56=="Pure Maths & Statistics"] <-46
d$alsubj1[d$edqsub56=="Pure Maths & Stats"] <-46
d$alsubj1[d$edqsub56=="pure maths and statistics"] <-46
d$alsubj1[d$edqsub56=="PURE MATHS AND STATISTICS"] <-46
d$alsubj1[d$edqsub56=="PURE MATHS AND STATS"] <-46
d$alsubj1[d$edqsub56=="pure maths and stats"] <-46
d$alsubj1[d$edqsub56=="PURE MATHS WITH STATISTIC"] <-46
d$alsubj1[d$edqsub56=="pure maths with statistic"] <-46
d$alsubj1[d$edqsub56=="Pure maths with stats"] <-46
d$alsubj1[d$edqsub56=="PURE MATHS WITH STATS"] <-46
d$alsubj1[d$edqsub56=="pure maths with stats."] <-46
d$alsubj1[d$edqsub56=="pure maths witih stats."] <-46
d$alsubj1[d$edqsub56=="pure maths/statistics"] <-46
d$alsubj1[d$edqsub56=="pure/statistal maths"] <-46
d$alsubj1[d$edqsub56=="stastics"] <-46
d$alsubj1[d$edqsub56=="statisics"] <-46
d$alsubj1[d$edqsub56=="STATISTICS"] <-46
d$alsubj1[d$edqsub56=="statistics"] <-46
d$alsubj1[d$edqsub56=="Statistics"] <-46
d$alsubj1[d$edqsub56=="stats"] <-46
d$alsubj1[d$edqsub56=="STATS"] <-46
d$alsubj1[d$edqsub56=="Applied Maths S level"] <-47
d$alsubj1[d$edqsub56=="Maths S/level"] <-46
d$alsubj1[d$edqsub56=="S level maths"] <-46
d$alsubj1[d$edqsub56=="s' level maths"] <-46
d$alsubj1[d$edqsub56=="Step maths"] <-46
d$alsubj1[d$edqsub56=="MEDIA"] <-48
d$alsubj1[d$edqsub56=="Media studies"] <-48
d$alsubj1[d$edqsub56=="music"] <-49
d$alsubj1[d$edqsub56=="Music"] <-49
d$alsubj1[d$edqsub56=="MUSIC"] <-49
d$alsubj1[d$edqsub56=="music practical"] <-49
d$alsubj1[d$edqsub56=="music theory"] <-49
d$alsubj1[d$edqsub56=="Practical music"] <-49
d$alsubj1[d$edqsub56=="Rudiments of Music"] <-49
d$alsubj1[d$edqsub56=="STAGE DECOR AND COSTUME D"] <-50
d$alsubj1[d$edqsub56=="FINANCIAL CONTROL"] <-50
d$alsubj1[d$edqsub56=="ceramics"] <-51
d$alsubj1[d$edqsub56=="CRAFT"] <-51
d$alsubj1[d$edqsub56=="CRAFT DESIGN & THEATRE ST"] <-51
d$alsubj1[d$edqsub56=="POTTERY"] <-51
d$alsubj1[d$edqsub56=="printing"] <-52
d$alsubj1[d$edqsub56=="TEXTILE AND DRESS"] <-52
d$alsubj1[d$edqsub56=="DRESS"] <-52
d$alsubj1[d$edqsub56=="dress and design"] <-52
d$alsubj1[d$edqsub56=="FOOD AND NUTRITION"] <-52
d$alsubj1[d$edqsub56=="food and nutrition"] <-52
d$alsubj1[d$edqsub56=="home econimics"] <-52
d$alsubj1[d$edqsub56=="home economic"] <-52
d$alsubj1[d$edqsub56=="HOME ECONOMICS"] <-52
d$alsubj1[d$edqsub56=="Home Economics"] <-52
d$alsubj1[d$edqsub56=="home economics"] <-52
d$alsubj1[d$edqsub56=="home economics - sewing"] <-52
d$alsubj1[d$edqsub56=="Home economics."] <-52
d$alsubj1[d$edqsub56=="HOME, FAMILY AND SOCIETY"] <-52
d$alsubj1[d$edqsub56=="HOME, FAMILY AND SOCIETY"] <-52
d$alsubj1[d$edqsub56=="CONFECTIONERY TECHNOLOGY"] <-52
d$alsubj1[d$edqsub56=="cookery"] <-52
d$alsubj1[d$edqsub56=="COOKERY"] <-52
d$alsubj1[d$edqsub56=="Domestic Science"] <-52
d$alsubj1[d$edqsub56=="surveying"] <-52
d$alsubj1[d$edqsub56=="tech drawing"] <-52
d$alsubj1[d$edqsub56=="TECH DRAWING"] <-52
d$alsubj1[d$edqsub56=="tech drawing"] <-52
d$alsubj1[d$edqsub56=="TECHNICAL DRAWING"] <-52
d$alsubj1[d$edqsub56=="technical drawing"] <-52
d$alsubj1[d$edqsub56=="Technical DRawing"] <-52
d$alsubj1[d$edqsub56=="technical drawing"] <-52
d$alsubj1[d$edqsub56=="Technical Drawing"] <-52
d$alsubj1[d$edqsub56=="BUILDING CONSTRUCTION"] <-52
d$alsubj1[d$edqsub56=="building construction"] <-52
d$alsubj1[d$edqsub56=="Needlework"] <-52
d$alsubj1[d$edqsub56== "stage craft and design"] <-52
d$alsubj1[d$edqsub56=="SECIENE"] <-62
d$alsubj1[d$edqsub56=="Health Scencie"] <-62
d$alsubj1[d$edqsub56=="HEALTH STUDIES"] <-62
d$alsubj1[d$edqsub56=="Science in Society"] <-62
d$alsubj1[d$edqsub56=="philosophy"] <-54
d$alsubj1[d$edqsub56=="Philosophy"] <-54
d$alsubj1[d$edqsub56=="PHILOSOPHY"] <-54
d$alsubj1[d$edqsub56=="philosphy"] <-54
d$alsubj1[d$edqsub56=="phisics"] <-56
d$alsubj1[d$edqsub56=="PHOTOGRAPHY"] <-55
d$alsubj1[d$edqsub56=="photography"] <-55
d$alsubj1[d$edqsub56=="physical education"] <-68
d$alsubj1[d$edqsub56=="PHYSICAL EDUCATION"] <-68
d$alsubj1[d$edqsub56=="HPYSICS"] <-56
d$alsubj1[d$edqsub56=="PHSICS"] <-56
d$alsubj1[d$edqsub56=="phsics"] <-56
d$alsubj1[d$edqsub56=="phsyics"] <-56
d$alsubj1[d$edqsub56=="phycics"] <-56
d$alsubj1[d$edqsub56=="PHYS"] <-56
d$alsubj1[d$edqsub56=="phys/  maths"] <-56
d$alsubj1[d$edqsub56=="PHYSIC"] <-56
d$alsubj1[d$edqsub56=="PHYSICA"] <-56
d$alsubj1[d$edqsub56=="Physiccs"] <-56
d$alsubj1[d$edqsub56=="Physics"] <-56
d$alsubj1[d$edqsub56=="PHYSICS"] <-56
d$alsubj1[d$edqsub56=="physics"] <-56
d$alsubj1[d$edqsub56=="PHYSICS A LEVEL"] <-56
d$alsubj1[d$edqsub56=="PHYSICS WITH ELECTRONICS"] <-56
d$alsubj1[d$edqsub56=="Physics."] <-56
d$alsubj1[d$edqsub56=="PHYSYCS"] <-56
d$alsubj1[d$edqsub56=="pyschics"] <-56
d$alsubj1[d$edqsub56=="PYSICS"] <-56
d$alsubj1[d$edqsub56=="PHICS"] <-56
d$alsubj1[d$edqsub56=="physics (s)"] <-57
d$alsubj1[d$edqsub56=="Physics S/level"] <-57
d$alsubj1[d$edqsub56=="PHYSICS STEP"] <-57
d$alsubj1[d$edqsub56=="British and American Poli"] <-36
d$alsubj1[d$edqsub56=="BRITISH GOV AND POLITICS"] <-36
d$alsubj1[d$edqsub56=="BRITISH GOVERN AND POLITI"] <-36
d$alsubj1[d$edqsub56=="British government"] <-36
d$alsubj1[d$edqsub56=="british government and po"] <-36
d$alsubj1[d$edqsub56=="British Government l& Pol"] <-36
d$alsubj1[d$edqsub56=="British Govt and politics"] <-36
d$alsubj1[d$edqsub56=="polatics and government"] <-36
d$alsubj1[d$edqsub56=="POLICTICAL HISTORY"] <-36
d$alsubj1[d$edqsub56=="POLITICAL AND ECONOMIC ST"] <-36
d$alsubj1[d$edqsub56=="Political History"] <-36
d$alsubj1[d$edqsub56=="political History"] <-36
d$alsubj1[d$edqsub56=="political history"] <-36
d$alsubj1[d$edqsub56=="political science"] <-36
d$alsubj1[d$edqsub56=="Political Studies"] <-36
d$alsubj1[d$edqsub56=="political studiesd"] <-36
d$alsubj1[d$edqsub56=="politics"] <-36
d$alsubj1[d$edqsub56=="POLITICS"] <-36
d$alsubj1[d$edqsub56=="Politics"] <-36
d$alsubj1[d$edqsub56=="politics & economics"] <-36
d$alsubj1[d$edqsub56=="politics & government"] <-36
d$alsubj1[d$edqsub56=="politics and government"] <-36
d$alsubj1[d$edqsub56=="Politics."] <-36
d$alsubj1[d$edqsub56=="Phsychology"] <-59
d$alsubj1[d$edqsub56=="phsycology"] <-59
d$alsubj1[d$edqsub56=="phychology"] <-59
d$alsubj1[d$edqsub56=="PHYCOLOGY"] <-59
d$alsubj1[d$edqsub56=="phycology"] <-59
d$alsubj1[d$edqsub56=="physchology"] <-59
d$alsubj1[d$edqsub56=="Physchology"] <-59
d$alsubj1[d$edqsub56=="physclogy"] <-59
d$alsubj1[d$edqsub56=="Physco;ogy"] <-59
d$alsubj1[d$edqsub56=="PHYSCOLOGY"] <-59
d$alsubj1[d$edqsub56=="physology"] <-59
d$alsubj1[d$edqsub56=="pschology"] <-59
d$alsubj1[d$edqsub56=="pschology"] <-59
d$alsubj1[d$edqsub56=="pshycoclgy"] <-59
d$alsubj1[d$edqsub56=="PSYCHOLOGY"] <-59
d$alsubj1[d$edqsub56=="psychology"] <-59
d$alsubj1[d$edqsub56=="Psychology"] <-59
d$alsubj1[d$edqsub56=="Psycology"] <-59
d$alsubj1[d$edqsub56=="PSYCOLOGY"] <-59
d$alsubj1[d$edqsub56=="public affairs"] <-36
d$alsubj1[d$edqsub56=="PYSCOLOGY"] <-59
d$alsubj1[d$edqsub56=="Divinity"] <-60
d$alsubj1[d$edqsub56=="DIVINITY"] <-60
d$alsubj1[d$edqsub56=="r.e"] <-60
d$alsubj1[d$edqsub56=="R.E."] <-60
d$alsubj1[d$edqsub56=="R.e."] <-60
d$alsubj1[d$edqsub56=="RE"] <-60
d$alsubj1[d$edqsub56=="re"] <-60
d$alsubj1[d$edqsub56=="REL. STUDIES"] <-60
d$alsubj1[d$edqsub56=="relegious studies"] <-60
d$alsubj1[d$edqsub56=="philosi"] <-54
d$alsubj1[d$edqsub56=="RELIG STUDIES"] <-60
d$alsubj1[d$edqsub56=="religeous studies"] <-60
d$alsubj1[d$edqsub56=="religious education"] <-60
d$alsubj1[d$edqsub56=="Religious Education"] <-60
d$alsubj1[d$edqsub56=="RELIGIOUS EDUCATION"] <-60
d$alsubj1[d$edqsub56=="religious education"] <-60
d$alsubj1[d$edqsub56=="religious knowledge"] <-60
d$alsubj1[d$edqsub56=="religious studies"] <-60
d$alsubj1[d$edqsub56=="RELIGIOUS STUDIES"] <-60
d$alsubj1[d$edqsub56=="Religious studies"] <-60
d$alsubj1[d$edqsub56=="religous"] <-60
d$alsubj1[d$edqsub56=="Religous Education"] <-60
d$alsubj1[d$edqsub56=="scriptire"] <-60
d$alsubj1[d$edqsub56=="theology"] <-60
d$alsubj1[d$edqsub56=="russian"] <-61
d$alsubj1[d$edqsub56=="secretarial"] <-63
d$alsubj1[d$edqsub56=="SECRETARIAL"] <-63
d$alsubj1[d$edqsub56=="SECRETARIAL STUDIES"] <-63
d$alsubj1[d$edqsub56=="Secretarial studies"] <-63
d$alsubj1[d$edqsub56=="SOCIAL BIOLOGY"] <-62
d$alsubj1[d$edqsub56=="social biology"] <-62
d$alsubj1[d$edqsub56=="Social biology"] <-62
d$alsubj1[d$edqsub56=="Social Biology"] <-62
d$alsubj1[d$edqsub56=="SOCIAL POLICY ADMIN"] <-64
d$alsubj1[d$edqsub56=="SOCIAL POLICY"] <-64
d$alsubj1[d$edqsub56=="Social sciences"] <-65
d$alsubj1[d$edqsub56=="social studies"] <-65
d$alsubj1[d$edqsub56=="health and social care"] <-65
d$alsubj1[d$edqsub56=="SOCIALGY"] <-66
d$alsubj1[d$edqsub56=="socialogy"] <-66
d$alsubj1[d$edqsub56=="SOCIALOGY"] <-66
d$alsubj1[d$edqsub56=="Socialolgy"] <-66
d$alsubj1[d$edqsub56=="socialologu"] <-66
d$alsubj1[d$edqsub56=="Socialology"] <-66
d$alsubj1[d$edqsub56=="SOCIOLGY"] <-66
d$alsubj1[d$edqsub56=="socioligy"] <-66
d$alsubj1[d$edqsub56=="sociolocy"] <-66
d$alsubj1[d$edqsub56=="SOCIOLOGOY"] <-66
d$alsubj1[d$edqsub56=="SOCIOLOGY"] <-66
d$alsubj1[d$edqsub56=="Sociology"] <-66
d$alsubj1[d$edqsub56=="sociology"] <-66
d$alsubj1[d$edqsub56=="SOCIOPLOGY"] <-66
d$alsubj1[d$edqsub56=="spanish"] <-67
d$alsubj1[d$edqsub56=="Spanish"] <-67
d$alsubj1[d$edqsub56=="SPANISH"] <-67
d$alsubj1[d$edqsub56=="spannish"] <-67
d$alsubj1[d$edqsub56=="sports studies"] <-68
d$alsubj1[d$edqsub56=="SPORTS STUDIES"] <-68
d$alsubj1[d$edqsub56=="Sports Studies"] <-68
d$alsubj1[d$edqsub56=="theater studies"] <-69
d$alsubj1[d$edqsub56=="Theatre Arts"] <-69
d$alsubj1[d$edqsub56=="THEATRE STUDIEAS"] <-69
d$alsubj1[d$edqsub56=="theatre studies"] <-69
d$alsubj1[d$edqsub56=="Theatre studies"] <-69
d$alsubj1[d$edqsub56=="Theatre Studies"] <-69
d$alsubj1[d$edqsub56=="THEATRE STUDIES"] <-69
d$alsubj1[d$edqsub56=="theatre studys"] <-69
d$alsubj1[d$edqsub56=="theatre stuides"] <-69
d$alsubj1[d$edqsub56=="Urban Studies"] <-51
d$alsubj1[d$edqsub56=="Urdu"] <-70
d$alsubj1[d$edqsub56=="welsh"] <-71
d$alsubj1[d$edqsub56=="WELSH"] <-71
d$alsubj1[d$edqsub56=="war and society"] <-51
d$alsubj1[d$edqsub56=="ZOOLOGY"] <-62
d$alsubj1[d$edqsub56=="zoology"] <-62
d$alsubj1[d$edqsub56=="MANAGEMENT"] <-51
d$alsubj1[d$edqsub56=="modern studies"] <-51
d$alsubj1[d$edqsub56=="MODERN STUDIES"] <-51

# A-level subject 2
d$alsubj2<-NA
d$alsubj2[d$edqsub57=="ACCOUNT AND BUSINESS"] <-1
d$alsubj2[d$edqsub57=="ACCOUNTANCY"] <-1
d$alsubj2[d$edqsub57=="accountancy"] <-1
d$alsubj2[d$edqsub57=="Accountancy"] <-1
d$alsubj2[d$edqsub57=="accountancy"] <-1
d$alsubj2[d$edqsub57=="Accounting"] <-1
d$alsubj2[d$edqsub57=="Accounts"] <-1
d$alsubj2[d$edqsub57=="accounts"] <-1
d$alsubj2[d$edqsub57=="ACCOUNTS"] <-1
d$alsubj2[d$edqsub57=="accounts(business studies"] <-1
d$alsubj2[d$edqsub57=="acounts"] <-1
d$alsubj2[d$edqsub57=="ancient greek"] 		<-2
d$alsubj2[d$edqsub57=="ancient history"] <-3
d$alsubj2[d$edqsub57=="ANCIENT HISTORY"] <-3
d$alsubj2[d$edqsub57=="Ancient History"] <-3
d$alsubj2[d$edqsub57=="ANCIENT HISTORYU"] <-3
d$alsubj2[d$edqsub57=="archaeology"] <-4
d$alsubj2[d$edqsub57=="Archaeology"] <-4
d$alsubj2[d$edqsub57=="2 dimensional art"] <-5
d$alsubj2[d$edqsub57=="art"] <-5
d$alsubj2[d$edqsub57=="3 dimensional art"] <-5
d$alsubj2[d$edqsub57=="Art"] <-5
d$alsubj2[d$edqsub57=="ART"] <-5
d$alsubj2[d$edqsub57=="ARTS"] <-5
d$alsubj2[d$edqsub57=="fine art"] <-5
d$alsubj2[d$edqsub57=="FINE ART"] <-5
d$alsubj2[d$edqsub57=="STUDY OF ART"] <-5
d$alsubj2[d$edqsub57=="Art & Craft"] <-5
d$alsubj2[d$edqsub57=="Art & Design"] <-5
d$alsubj2[d$edqsub57=="art & design technology"] <-5
d$alsubj2[d$edqsub57=="ART 7 DESIGN"] <-5
d$alsubj2[d$edqsub57=="ART AND ART HISTORY"] <-5
d$alsubj2[d$edqsub57=="Art and Art History"] <-5
d$alsubj2[d$edqsub57=="art and crafts"] <-5
d$alsubj2[d$edqsub57=="Art and design"] <-5
d$alsubj2[d$edqsub57=="ART AND DESIGN"] <-5
d$alsubj2[d$edqsub57=="art/design"] <-5
d$alsubj2[d$edqsub57=="art history"] <-5
d$alsubj2[d$edqsub57=="Art History"] <-5
d$alsubj2[d$edqsub57=="art with art history"] <-5
d$alsubj2[d$edqsub57=="ART WITH ART HISTORY"] <-5
d$alsubj2[d$edqsub57=="art/art history"] <-5
d$alsubj2[d$edqsub57=="Art/Art History"] <-5
d$alsubj2[d$edqsub57=="history of aft"] <-5
d$alsubj2[d$edqsub57=="History of art"] <-5
d$alsubj2[d$edqsub57=="History of Art"] <-5
d$alsubj2[d$edqsub57=="bilogy"] <-6
d$alsubj2[d$edqsub57=="biol"] <-6
d$alsubj2[d$edqsub57=="biol;gy"] <-6
d$alsubj2[d$edqsub57=="Biology"] <-6
d$alsubj2[d$edqsub57=="biology"] <-6
d$alsubj2[d$edqsub57=="BIOLOGY"] <-6
d$alsubj2[d$edqsub57=="biology  c"] <-6
d$alsubj2[d$edqsub57=="Biology - retake"] <-6
d$alsubj2[d$edqsub57=="boilogy"] <-6
d$alsubj2[d$edqsub57=="BOTTANY"] <-6
d$alsubj2[d$edqsub57=="practical biology"] <-6
d$alsubj2[d$edqsub57=="theoretical biology"] <-6
d$alsubj2[d$edqsub57=="biology s level"] <-7
d$alsubj2[d$edqsub57=="buisiness studies"] <-11
d$alsubj2[d$edqsub57=="BUISNESS STUDIES"] <-11
d$alsubj2[d$edqsub57=="BUISNESS STUDIES"] <-11
d$alsubj2[d$edqsub57=="buisness studies"] <-11
d$alsubj2[d$edqsub57=="BUISNESS STUDIES"] <-11
d$alsubj2[d$edqsub57=="business"] <-11
d$alsubj2[d$edqsub57=="Business Studies"] <-11
d$alsubj2[d$edqsub57=="BUSINESS STUDIES BIOLOGY"] <-11
d$alsubj2[d$edqsub57=="Business SudiesInform"] <-11
d$alsubj2[d$edqsub57=="CEMISTERY"] <-12
d$alsubj2[d$edqsub57=="CHE M"] <-12
d$alsubj2[d$edqsub57=="CHEM"] <-12
d$alsubj2[d$edqsub57=="Chem"] <-12
d$alsubj2[d$edqsub57=="chem"] <-12
d$alsubj2[d$edqsub57=="chemestry"] <-12
d$alsubj2[d$edqsub57=="CHEMISRTY"] <-12
d$alsubj2[d$edqsub57=="chemisrty"] <-12
d$alsubj2[d$edqsub57=="CHEMISTERY"] <-12
d$alsubj2[d$edqsub57=="chemistrry"] <-12
d$alsubj2[d$edqsub57=="Chemistry"] <-12
d$alsubj2[d$edqsub57=="CHEMISTRY"] <-12
d$alsubj2[d$edqsub57=="Chemistry - retake"] <-12
d$alsubj2[d$edqsub57=="chemistry (s)"] <-12
d$alsubj2[d$edqsub57=="CHEMISTRY A LEVEL"] <-12
d$alsubj2[d$edqsub57=="chemistyr"] <-12
d$alsubj2[d$edqsub57=="CHEMISTYR"] <-12
d$alsubj2[d$edqsub57=="CHEMSTRY"] <-12
d$alsubj2[d$edqsub57=="CHENISTRY"] <-12
d$alsubj2[d$edqsub57=="Chemistry S level"] <-13
d$alsubj2[d$edqsub57=="chemistry s level"] <-13
d$alsubj2[d$edqsub57=="Chemistry -S level"] <-13
d$alsubj2[d$edqsub57=="s' level chemestry"] <-13
d$alsubj2[d$edqsub57=="Special Chemistry"] <-13
d$alsubj2[d$edqsub57=="clasical civilisation"] <-14
d$alsubj2[d$edqsub57=="clasics"] <-14
d$alsubj2[d$edqsub57=="classical civilations"] <-14
d$alsubj2[d$edqsub57=="classical civilisation"] <-14
d$alsubj2[d$edqsub57=="CLASSICAL CIVILISATION"] <-14
d$alsubj2[d$edqsub57=="CLASSICAL CIVILISATIONS"] <-14
d$alsubj2[d$edqsub57=="CLASSICAL CIVILIZATION"] <-14
d$alsubj2[d$edqsub57=="CLASSICAL STUDIES"] <-14
d$alsubj2[d$edqsub57=="CLASSICS"] <-15
d$alsubj2[d$edqsub57=="COMMUNICATION STUDIES"] <-16
d$alsubj2[d$edqsub57=="communication studies"] <-16
d$alsubj2[d$edqsub57=="COMMUNICATIONS"] <-16
d$alsubj2[d$edqsub57=="COMMUNICATIONS STUDIES"] <-16
d$alsubj2[d$edqsub57=="Communications studies"] <-16
d$alsubj2[d$edqsub57=="applied computer science"] <-17
d$alsubj2[d$edqsub57=="comp studies"] <-17
d$alsubj2[d$edqsub57=="COMPTUTING SKILLS"] <-17
d$alsubj2[d$edqsub57=="COMPUTER PROGRAMMING"] <-17
d$alsubj2[d$edqsub57=="Computer Science"] <-17
d$alsubj2[d$edqsub57=="COMPUTER SCIENCE"] <-17
d$alsubj2[d$edqsub57=="computer science"] <-17
d$alsubj2[d$edqsub57=="computer sciences"] <-17
d$alsubj2[d$edqsub57=="Computer Sciencse"] <-17
d$alsubj2[d$edqsub57=="COMPUTER SICENCE"] <-17
d$alsubj2[d$edqsub57=="Computer Studies"] <-17
d$alsubj2[d$edqsub57=="Computer Studies"] <-17
d$alsubj2[d$edqsub57=="computer studies"] <-17
d$alsubj2[d$edqsub57=="Computer studies"] <-17
d$alsubj2[d$edqsub57=="computing"] <-17
d$alsubj2[d$edqsub57=="Computing"] <-17
d$alsubj2[d$edqsub57=="coputer science"] <-17
d$alsubj2[d$edqsub57=="information Technology"] <-17
d$alsubj2[d$edqsub57=="IT"] <-17
d$alsubj2[d$edqsub57=="Computer science S level"] <-18
d$alsubj2[d$edqsub57=="craft design and technolo"] <-19
d$alsubj2[d$edqsub57=="Design"] <-19
d$alsubj2[d$edqsub57=="design"] <-19
d$alsubj2[d$edqsub57=="DESIGN"] <-19
d$alsubj2[d$edqsub57=="dESIGN & tECHNOLGY"] <-19
d$alsubj2[d$edqsub57=="Design & Technology"] <-19
d$alsubj2[d$edqsub57=="design and technology"] <-19
d$alsubj2[d$edqsub57=="Design and Technology"] <-19
d$alsubj2[d$edqsub57=="design craft and technolo"] <-19
d$alsubj2[d$edqsub57=="design technology"] <-19
d$alsubj2[d$edqsub57=="DESIGN TECHNOLOGY"] <-19
d$alsubj2[d$edqsub57=="c.d.t"] <-19
d$alsubj2[d$edqsub57=="technology"] <-19
d$alsubj2[d$edqsub57=="Technology"] <-19
d$alsubj2[d$edqsub57=="DRAMA"] <-20
d$alsubj2[d$edqsub57=="Drama"] <-20
d$alsubj2[d$edqsub57=="drama and theatre arts"] <-20
d$alsubj2[d$edqsub57=="dance"] <-20
d$alsubj2[d$edqsub57=="Dance and Drama"] <-20
d$alsubj2[d$edqsub57=="ECCONOMICS"] <-21
d$alsubj2[d$edqsub57=="ecomics"] <-21
d$alsubj2[d$edqsub57=="ECOMICS"] <-21
d$alsubj2[d$edqsub57=="ecomincs"] <-21
d$alsubj2[d$edqsub57=="Ecomonics"] <-21
d$alsubj2[d$edqsub57=="ecomopmics"] <-21
d$alsubj2[d$edqsub57=="econ"] <-21
d$alsubj2[d$edqsub57=="ECON"] <-21
d$alsubj2[d$edqsub57=="ECONIICS"] <-21
d$alsubj2[d$edqsub57=="Econimics"] <-21
d$alsubj2[d$edqsub57=="econimics"] <-21
d$alsubj2[d$edqsub57=="Econimins"] <-21
d$alsubj2[d$edqsub57=="Econmics"] <-21
d$alsubj2[d$edqsub57=="econo;mics"] <-21
d$alsubj2[d$edqsub57=="ECONOMIC"] <-21
d$alsubj2[d$edqsub57=="Economic"] <-21
d$alsubj2[d$edqsub57=="economic and social histo"] <-21
d$alsubj2[d$edqsub57=="economices"] <-21
d$alsubj2[d$edqsub57=="economics"] <-21
d$alsubj2[d$edqsub57=="Economics"] <-21
d$alsubj2[d$edqsub57=="ECONOMICS"] <-21
d$alsubj2[d$edqsub57=="economics & politics"] <-21
d$alsubj2[d$edqsub57=="Economics & World Affairs"] <-21
d$alsubj2[d$edqsub57=="economics with politics"] <-21
d$alsubj2[d$edqsub57=="economicse"] <-21
d$alsubj2[d$edqsub57=="economis and world affair"] <-21
d$alsubj2[d$edqsub57=="Ecvonomics"] <-21
d$alsubj2[d$edqsub57=="encominics"] <-21
d$alsubj2[d$edqsub57=="ECONOMICS AT S LEVEL"] <-22
d$alsubj2[d$edqsub57=="Electronic Systems"] <-23
d$alsubj2[d$edqsub57=="ELECTRONIC\S#"] <-23
d$alsubj2[d$edqsub57=="eLECTRONICS"] <-23
d$alsubj2[d$edqsub57=="Electronics"] <-23
d$alsubj2[d$edqsub57=="electronics"] <-23
d$alsubj2[d$edqsub57=="ELECTRONICS"] <-23
d$alsubj2[d$edqsub57=="Electronics"] <-23
d$alsubj2[d$edqsub57=="electronics/statistics"] <-23
d$alsubj2[d$edqsub57=="microelectronics"] <-23
d$alsubj2[d$edqsub57=="ENGINEERING"] <-24
d$alsubj2[d$edqsub57=="ENGINEERING DRAWING"] <-24
d$alsubj2[d$edqsub57=="Engineering Drawing"] <-24
d$alsubj2[d$edqsub57=="Engineering drawing"] <-24
d$alsubj2[d$edqsub57=="engineering drawing"] <-24
d$alsubj2[d$edqsub57=="ENGINEERING DRAWING AND D"] <-24
d$alsubj2[d$edqsub57=="ENGINEERING METALWORK"] <-24
d$alsubj2[d$edqsub57=="ENGINEERING SCIENCE"] <-24
d$alsubj2[d$edqsub57=="Geometric and Engineering"] <-24
d$alsubj2[d$edqsub57=="combined english"] <-25
d$alsubj2[d$edqsub57=="ebglish"] <-25
d$alsubj2[d$edqsub57=="En g Lit"] <-25
d$alsubj2[d$edqsub57=="eng"] <-25
d$alsubj2[d$edqsub57=="ENG"] <-25
d$alsubj2[d$edqsub57=="ENG .LIT"] <-25
d$alsubj2[d$edqsub57=="eng lang"] <-25
d$alsubj2[d$edqsub57=="ENG LANG"] <-25
d$alsubj2[d$edqsub57=="Eng Lang"] <-25
d$alsubj2[d$edqsub57=="eng language/literature"] <-25
d$alsubj2[d$edqsub57=="ENG LIT"] <-25
d$alsubj2[d$edqsub57=="eng lit"] <-25
d$alsubj2[d$edqsub57=="Eng lit"] <-25
d$alsubj2[d$edqsub57=="eng lit."] <-25
d$alsubj2[d$edqsub57=="eng Slevel"] <-25
d$alsubj2[d$edqsub57=="Eng. Lit"] <-25
d$alsubj2[d$edqsub57=="ENG. LIT"] <-25
d$alsubj2[d$edqsub57=="Eng. Lit."] <-25
d$alsubj2[d$edqsub57=="ENG.LIT 1"] <-25
d$alsubj2[d$edqsub57=="eng.lit."] <-25
d$alsubj2[d$edqsub57=="eng/language."] <-25
d$alsubj2[d$edqsub57=="engl"] <-25
d$alsubj2[d$edqsub57=="English"] <-25
d$alsubj2[d$edqsub57=="ENGLISH"] <-25
d$alsubj2[d$edqsub57=="english"] <-25
d$alsubj2[d$edqsub57=="English  lit."] <-25
d$alsubj2[d$edqsub57=="English  lit."] <-25
d$alsubj2[d$edqsub57=="English (Literature)"] <-25
d$alsubj2[d$edqsub57=="ENGLISH ;LITERATURE"] <-25
d$alsubj2[d$edqsub57=="ENGLISH LANG"] <-25
d$alsubj2[d$edqsub57=="english lang"] <-25
d$alsubj2[d$edqsub57=="ENGLISH LANG & LIT"] <-25
d$alsubj2[d$edqsub57=="English Lang and Lit"] <-25
d$alsubj2[d$edqsub57=="English Lang."] <-25
d$alsubj2[d$edqsub57=="english lang.& lit."] <-25
d$alsubj2[d$edqsub57=="English lang/lit"] <-25
d$alsubj2[d$edqsub57=="ENGLISH LANG/LIT"] <-25
d$alsubj2[d$edqsub57=="english language"] <-25
d$alsubj2[d$edqsub57=="English Language"] <-25
d$alsubj2[d$edqsub57=="english language"] <-25
d$alsubj2[d$edqsub57=="ENGLISH LANGUAGE"] <-25
d$alsubj2[d$edqsub57=="English language"] <-25
d$alsubj2[d$edqsub57=="english Language"] <-25
d$alsubj2[d$edqsub57=="English language & Litera"] <-25
d$alsubj2[d$edqsub57=="english language & litera"] <-25
d$alsubj2[d$edqsub57=="ENGLISH LANGUAGE AND LIT"] <-25
d$alsubj2[d$edqsub57=="ENGLISH LANGUAGE AND LITE"] <-25
d$alsubj2[d$edqsub57=="english language/literatu"] <-25
d$alsubj2[d$edqsub57=="english lit"] <-25
d$alsubj2[d$edqsub57=="ENGLISH LIT"] <-25
d$alsubj2[d$edqsub57=="English Lit"] <-25
d$alsubj2[d$edqsub57=="english lit and lang"] <-25
d$alsubj2[d$edqsub57=="ENGLISH LIT AND LANGUAGE"] <-25
d$alsubj2[d$edqsub57=="english lit."] <-25
d$alsubj2[d$edqsub57=="English lit."] <-25
d$alsubj2[d$edqsub57=="ENGLISH LIT."] <-25
d$alsubj2[d$edqsub57=="English lit/lang"] <-25
d$alsubj2[d$edqsub57=="english litand language"] <-25
d$alsubj2[d$edqsub57=="english litature"] <-25
d$alsubj2[d$edqsub57=="ENGLISH LITERATURE"] <-25
d$alsubj2[d$edqsub57=="English Literature"] <-25
d$alsubj2[d$edqsub57=="english literature"] <-25
d$alsubj2[d$edqsub57=="English literature"] <-25
d$alsubj2[d$edqsub57=="English Literature & Lang"] <-25
d$alsubj2[d$edqsub57=="ENGLISH LITERATURE & LANG"] <-25
d$alsubj2[d$edqsub57=="English Literature/Lang."] <-25
d$alsubj2[d$edqsub57=="English Litereature"] <-25
d$alsubj2[d$edqsub57=="ENGLISH LITERTURA"] <-25
d$alsubj2[d$edqsub57=="English Litterature"] <-25
d$alsubj2[d$edqsub57=="english not specific"] <-25
d$alsubj2[d$edqsub57=="ENLISH"] <-25
d$alsubj2[d$edqsub57=="ENLISH LANGUAGE/LITERATUR"] <-25
d$alsubj2[d$edqsub57=="Environmental Sc"] <-62
d$alsubj2[d$edqsub57=="environmental science"] <-62
d$alsubj2[d$edqsub57=="Environmental Studies"] <-62
d$alsubj2[d$edqsub57=="Fashion"] <-52
d$alsubj2[d$edqsub57=="fashion"] <-52
d$alsubj2[d$edqsub57=="Fashion & textiles"] <-52
d$alsubj2[d$edqsub57=="fashion and design"] <-52
d$alsubj2[d$edqsub57=="fashion and fabric"] <-52
d$alsubj2[d$edqsub57=="Fashion design"] <-52
d$alsubj2[d$edqsub57=="film studies"] <-26
d$alsubj2[d$edqsub57=="FILM STUDIES"] <-26
d$alsubj2[d$edqsub57=="freanch"] <-27
d$alsubj2[d$edqsub57=="frech"	] <-27
d$alsubj2[d$edqsub57=="FRENCH"] <-27
d$alsubj2[d$edqsub57=="french"] <-27
d$alsubj2[d$edqsub57=="French"] <-27
d$alsubj2[d$edqsub57=="french for business"] <-27
d$alsubj2[d$edqsub57=="french lang"] <-27		
d$alsubj2[d$edqsub57=="French Literature"] <-27
d$alsubj2[d$edqsub57=="FRENCH1"] <-27
d$alsubj2[d$edqsub57=="French S level"] <-28
d$alsubj2[d$edqsub57=="Furhther Maths"] <-29
d$alsubj2[d$edqsub57=="further math"] <-29
d$alsubj2[d$edqsub57=="further mathematics"] <-29
d$alsubj2[d$edqsub57=="Further mathematics"] <-29
d$alsubj2[d$edqsub57=="FURTHER MATHEMATICS"] <-29
d$alsubj2[d$edqsub57=="Further Mathematics"] <-29
d$alsubj2[d$edqsub57=="further maths"] <-29
d$alsubj2[d$edqsub57=="Further Maths"] <-29
d$alsubj2[d$edqsub57=="Futher maths"] <-29
d$alsubj2[d$edqsub57=="FURTHER MATHS"] <-29
d$alsubj2[d$edqsub57=="FURTHER MATH"] <-29
d$alsubj2[d$edqsub57=="Further Maths - Pure and"] <-29
d$alsubj2[d$edqsub57=="FURTHER MATHS A LEVEL"] <-29
d$alsubj2[d$edqsub57=="FUTHER MATHS"] <-29
d$alsubj2[d$edqsub57=="further maths (s)"] <-30
d$alsubj2[d$edqsub57=="FURTHER MATHS S LEVEL"] <-30
d$alsubj2[d$edqsub57=="FURTHER MATHS STEP"] <-30
d$alsubj2[d$edqsub57=="S level further maths"] <-30
d$alsubj2[d$edqsub57=="GEN STUD"] <-31
d$alsubj2[d$edqsub57=="gen stud"] <-31
d$alsubj2[d$edqsub57=="gen studies"] <-31
d$alsubj2[d$edqsub57=="GEN STUDIES"] <-31
d$alsubj2[d$edqsub57=="Gen studies"] <-31
d$alsubj2[d$edqsub57=="Gen Studies"] <-31
d$alsubj2[d$edqsub57=="GEN STUDIES RELIGIOUS STU"] <-31
d$alsubj2[d$edqsub57=="gen. studies"] <-31
d$alsubj2[d$edqsub57=="gen.studies"] <-31
d$alsubj2[d$edqsub57=="general"] <-31
d$alsubj2[d$edqsub57=="GENERAL"] <-31
d$alsubj2[d$edqsub57=="general   studies"] <-31
d$alsubj2[d$edqsub57=="general  tudies"] <-31
d$alsubj2[d$edqsub57=="general knowl;edfge"] <-31
d$alsubj2[d$edqsub57=="GENERAL STIUDIES"] <-31
d$alsubj2[d$edqsub57=="GENERAL STUDIES"] <-31
d$alsubj2[d$edqsub57=="general studies"] <-31
d$alsubj2[d$edqsub57=="General studies"] <-31
d$alsubj2[d$edqsub57=="General Studies"] <-31
d$alsubj2[d$edqsub57=="GENERAL STUDY"] <-31
d$alsubj2[d$edqsub57=="general study"] <-31
d$alsubj2[d$edqsub57=="general studys"] <-31
d$alsubj2[d$edqsub57=="Genereal Studies"] <-31
d$alsubj2[d$edqsub57=="genstudies"] <-31
d$alsubj2[d$edqsub57=="1GEOGRAPHY"] <-32
d$alsubj2[d$edqsub57=="gegraphy"] <-32
d$alsubj2[d$edqsub57=="GEGRAPHY"] <-32
d$alsubj2[d$edqsub57=="geoagraphy"] <-32
d$alsubj2[d$edqsub57=="geog"] <-32
d$alsubj2[d$edqsub57=="Geog"] <-32
d$alsubj2[d$edqsub57=="GEOG"] <-32
d$alsubj2[d$edqsub57=="GEOGHRAY"] <-32
d$alsubj2[d$edqsub57=="geogr"] <-32
d$alsubj2[d$edqsub57=="GEOGRAGHY"] <-32
d$alsubj2[d$edqsub57=="GEOGRAHY"] <-32
d$alsubj2[d$edqsub57=="geographt"] <-32
d$alsubj2[d$edqsub57=="GEOGRAPHY"] <-32
d$alsubj2[d$edqsub57=="Geography"] <-32
d$alsubj2[d$edqsub57=="geography"] <-32
d$alsubj2[d$edqsub57=="geography grade d"] <-32
d$alsubj2[d$edqsub57=="geographyy"] <-32
d$alsubj2[d$edqsub57=="geograqphy"] <-32
d$alsubj2[d$edqsub57=="geophraphy"] <-32
d$alsubj2[d$edqsub57=="gepgraphy"] <-32
d$alsubj2[d$edqsub57=="GOEG"] <-32
d$alsubj2[d$edqsub57=="goegraphy"] <-32
d$alsubj2[d$edqsub57=="goegraphy"] <-32
d$alsubj2[d$edqsub57=="geog   s level"] <-33
d$alsubj2[d$edqsub57=="geog s level"] <-33
d$alsubj2[d$edqsub57=="GEOGRAPHY S LEVEL"] <-33
d$alsubj2[d$edqsub57=="geography s level"] <-33
d$alsubj2[d$edqsub57=="geology"] <-34
d$alsubj2[d$edqsub57=="Geology"] <-34
d$alsubj2[d$edqsub57=="GEOLOGY"] <-34
d$alsubj2[d$edqsub57=="German"] <-35
d$alsubj2[d$edqsub57=="german"] <-35
d$alsubj2[d$edqsub57=="GERMAN"] <-35
d$alsubj2[d$edqsub57=="German S level"] <-35
d$alsubj2[d$edqsub57=="German."] <-35
d$alsubj2[d$edqsub57=="gevernment politics"] <-36
d$alsubj2[d$edqsub57=="govenment and politics"] <-36
d$alsubj2[d$edqsub57=="GOVERNMENT"] <-36
d$alsubj2[d$edqsub57=="Government & politics"] <-36
d$alsubj2[d$edqsub57=="GOVERNMENT & POLITICS"] <-36
d$alsubj2[d$edqsub57=="GOVERNMENT & POLITICS"] <-36
d$alsubj2[d$edqsub57=="GOVERNMENT AND POLITICAL"] <-36
d$alsubj2[d$edqsub57=="GOVERNMENT AND POLITICS"] <-36
d$alsubj2[d$edqsub57=="government and politics"] <-36
d$alsubj2[d$edqsub57=="Government and Politics"] <-36
d$alsubj2[d$edqsub57=="GOVERNMENT POLITICS"] <-36
d$alsubj2[d$edqsub57=="governmental politics"] <-36
d$alsubj2[d$edqsub57=="Govrnment and politics"] <-36
d$alsubj2[d$edqsub57=="Govt and politics"] <-36
d$alsubj2[d$edqsub57=="GOVT AND POLITICS"] <-36
d$alsubj2[d$edqsub57=="GOVT. AND POLITICS"] <-36
d$alsubj2[d$edqsub57=="govt/politics"] <-36
d$alsubj2[d$edqsub57=="GRAPHIC \DESIGN"] <-37
d$alsubj2[d$edqsub57=="GRAPHIC DESIGN"] <-37
d$alsubj2[d$edqsub57=="Graphic Design"] <-37
d$alsubj2[d$edqsub57=="graphic design"] <-37
d$alsubj2[d$edqsub57=="graphical communication"] <-37
d$alsubj2[d$edqsub57=="Graphical communication"] <-37
d$alsubj2[d$edqsub57=="gre ke"] <-38
d$alsubj2[d$edqsub57=="GREEK"] <-38
d$alsubj2[d$edqsub57=="greek"] <-38
d$alsubj2[d$edqsub57== "MODERN GREEK"] <-38
d$alsubj2[d$edqsub57==";history"] <-39
d$alsubj2[d$edqsub57=="19 centuary british and e"] <-39
d$alsubj2[d$edqsub57=="American History"] <-39
d$alsubj2[d$edqsub57=="HIDTORY"] <-39
d$alsubj2[d$edqsub57=="hist"] <-39
d$alsubj2[d$edqsub57=="History"] <-39
d$alsubj2[d$edqsub57=="HISTORY"] <-39
d$alsubj2[d$edqsub57=="history"] <-39
d$alsubj2[d$edqsub57=="History (modern)"] <-39
d$alsubj2[d$edqsub57=="History."] <-39
d$alsubj2[d$edqsub57=="Histoy"] <-39
d$alsubj2[d$edqsub57=="histroy"] <-39
d$alsubj2[d$edqsub57=="medeaevil history"] <-39
d$alsubj2[d$edqsub57=="MEDIEVAL HISTORY"] <-39
d$alsubj2[d$edqsub57=="MODERN HISTORY"] <-39
d$alsubj2[d$edqsub57=="Social & Economic History"] <-39
d$alsubj2[d$edqsub57=="Social and economic histo"] <-39
d$alsubj2[d$edqsub57=="HISTORY S LEVEL"] <-40
d$alsubj2[d$edqsub57=="history S level"] <-40
d$alsubj2[d$edqsub57=="hum,an bilogy"] <-62
d$alsubj2[d$edqsub57=="human  biology"] <-62
d$alsubj2[d$edqsub57=="human biology"] <-62
d$alsubj2[d$edqsub57=="Human biology"] <-62
d$alsubj2[d$edqsub57=="Human Biology"] <-62
d$alsubj2[d$edqsub57=="human physiology"] <-62
d$alsubj2[d$edqsub57=="HUMAN BIOLOGY"] <-62
d$alsubj2[d$edqsub57=="HUMAN PHYSIOLOGY"] <-62
d$alsubj2[d$edqsub57=="humanbiology"] <-62
d$alsubj2[d$edqsub57=="humanphysiology"] <-62
d$alsubj2[d$edqsub57=="industrila studies"] <-41
d$alsubj2[d$edqsub57=="Industrial Studies"] <-41
d$alsubj2[d$edqsub57=="Italian"] <-42
d$alsubj2[d$edqsub57=="LATIN"] <-43
d$alsubj2[d$edqsub57=="latin"] <-43
d$alsubj2[d$edqsub57=="Latin"] <-43
d$alsubj2[d$edqsub57=="Latin S level"] <-44
d$alsubj2[d$edqsub57=="latin s level"] <-44
d$alsubj2[d$edqsub57=="LATIN SPECIAL"] <-44
d$alsubj2[d$edqsub57=="English Law."] <-45
d$alsubj2[d$edqsub57=="criminal law"] <-45
d$alsubj2[d$edqsub57=="Law"] <-45
d$alsubj2[d$edqsub57=="law"] <-45
d$alsubj2[d$edqsub57=="LAW"] <-45
d$alsubj2[d$edqsub57=="low"] <-45
d$alsubj2[d$edqsub57=="applied and pure maths"] <-46
d$alsubj2[d$edqsub57=="Applied Mathematics"] <-46
d$alsubj2[d$edqsub57=="applied mathematics"] <-46
d$alsubj2[d$edqsub57=="APPLIED MATHS"] <-46
d$alsubj2[d$edqsub57=="applied maths"] <-46
d$alsubj2[d$edqsub57=="Applied Maths"] <-46
d$alsubj2[d$edqsub57=="combined maths"] <-46
d$alsubj2[d$edqsub57=="Maaths"] <-46
d$alsubj2[d$edqsub57=="Matematics"] <-46
d$alsubj2[d$edqsub57=="MATH"] <-46
d$alsubj2[d$edqsub57=="math"] <-46
d$alsubj2[d$edqsub57=="Math & General knowladge"] <-46
d$alsubj2[d$edqsub57=="Mathematics"] <-46
d$alsubj2[d$edqsub57=="mATHEMATICS"] <-46
d$alsubj2[d$edqsub57=="MATHEMATICS"] <-46
d$alsubj2[d$edqsub57=="mathematics"] <-46
d$alsubj2[d$edqsub57=="MATHEMATICS - PURE/APLIED"] <-46
d$alsubj2[d$edqsub57=="mathematics and art"] <-46
d$alsubj2[d$edqsub57=="Mathematics and Statistic"] <-46
d$alsubj2[d$edqsub57=="Mathematics with stats"] <-46
d$alsubj2[d$edqsub57=="mathematics, pure and app"] <-46
d$alsubj2[d$edqsub57=="MATHMATICS AND STATISTICS"] <-46
d$alsubj2[d$edqsub57=="Maths"] <-46
d$alsubj2[d$edqsub57=="maths"] <-46
d$alsubj2[d$edqsub57=="MATHS"] <-46
d$alsubj2[d$edqsub57=="maths & mechanics"] <-46
d$alsubj2[d$edqsub57=="Maths & Statistics"] <-46
d$alsubj2[d$edqsub57=="maths & statistics"] <-46
d$alsubj2[d$edqsub57=="Maths (pure and Applied)"] <-46
d$alsubj2[d$edqsub57=="Maths /pure and applied"] <-46
d$alsubj2[d$edqsub57=="maths + stats"] <-46
d$alsubj2[d$edqsub57=="MATHS A LEVEL"] <-46
d$alsubj2[d$edqsub57=="maths an"] <-46
d$alsubj2[d$edqsub57=="MATHS AND STATISTICS"] <-46
d$alsubj2[d$edqsub57=="maths and statistics"] <-46
d$alsubj2[d$edqsub57=="Maths and stats"] <-46
d$alsubj2[d$edqsub57=="MATHS AND STATS"] <-46
d$alsubj2[d$edqsub57=="maths AS"] <-46
d$alsubj2[d$edqsub57=="maths pure"] <-46
d$alsubj2[d$edqsub57=="maths pure and applied"] <-46
d$alsubj2[d$edqsub57=="MATHS- PURE AND APPLIED"] <-46
d$alsubj2[d$edqsub57=="Maths pure l& applied"] <-46
d$alsubj2[d$edqsub57=="MATHS S LEVEL"] <-46
d$alsubj2[d$edqsub57=="MATHS WITH STATISTICS"] <-46
d$alsubj2[d$edqsub57=="maths with statistics"] <-46
d$alsubj2[d$edqsub57=="maths with stats"] <-46
d$alsubj2[d$edqsub57=="Maths with stats."] <-46
d$alsubj2[d$edqsub57=="MATHS, PURE AND APPLIED"] <-46
d$alsubj2[d$edqsub57=="maths."] <-46
d$alsubj2[d$edqsub57=="MATHS."] <-46
d$alsubj2[d$edqsub57=="Maths."] <-46
d$alsubj2[d$edqsub57=="Maths/pure and applied"] <-46
d$alsubj2[d$edqsub57=="Maths/Statistics"] <-46
d$alsubj2[d$edqsub57=="MATHSW"] <-46
d$alsubj2[d$edqsub57=="Mathsw"] <-46
d$alsubj2[d$edqsub57=="mechanics"] <-46
d$alsubj2[d$edqsub57=="MMaths"] <-46
d$alsubj2[d$edqsub57=="PURE & APPL MATHS"] <-46
d$alsubj2[d$edqsub57=="Pure & Applied Maths"] <-46
d$alsubj2[d$edqsub57=="pure and applied maths"] <-46
d$alsubj2[d$edqsub57=="PURE AND APPLIED MATHS"] <-46
d$alsubj2[d$edqsub57=="Pure M aths & Statistics"] <-46
d$alsubj2[d$edqsub57=="pure mathematics"] <-46
d$alsubj2[d$edqsub57=="PURE MATHEMATICS"] <-46
d$alsubj2[d$edqsub57=="pure mathematics"] <-46
d$alsubj2[d$edqsub57=="pure maths"] <-46
d$alsubj2[d$edqsub57=="PURE MATHS"] <-46
d$alsubj2[d$edqsub57=="Pure maths"] <-46
d$alsubj2[d$edqsub57=="Pure Maths"] <-46
d$alsubj2[d$edqsub57=="Pure Maths & Mechanics"] <-46
d$alsubj2[d$edqsub57=="Pure Maths & Statistics"] <-46
d$alsubj2[d$edqsub57=="Pure Maths & Stats"] <-46
d$alsubj2[d$edqsub57=="pure maths and statistics"] <-46
d$alsubj2[d$edqsub57=="PURE MATHS AND STATISTICS"] <-46
d$alsubj2[d$edqsub57=="PURE MATHS AND STATS"] <-46
d$alsubj2[d$edqsub57=="pure maths and stats"] <-46
d$alsubj2[d$edqsub57=="PURE MATHS WITH STATISTIC"] <-46
d$alsubj2[d$edqsub57=="pure maths with statistic"] <-46
d$alsubj2[d$edqsub57=="Pure maths with stats"] <-46
d$alsubj2[d$edqsub57=="PURE MATHS WITH STATS"] <-46
d$alsubj2[d$edqsub57=="pure maths with stats."] <-46
d$alsubj2[d$edqsub57=="pure maths witih stats."] <-46
d$alsubj2[d$edqsub57=="pure maths/statistics"] <-46
d$alsubj2[d$edqsub57=="pure/statistal maths"] <-46
d$alsubj2[d$edqsub57=="stastics"] <-46
d$alsubj2[d$edqsub57=="statisics"] <-46
d$alsubj2[d$edqsub57=="STATISTICS"] <-46
d$alsubj2[d$edqsub57=="statistics"] <-46
d$alsubj2[d$edqsub57=="Statistics"] <-46
d$alsubj2[d$edqsub57=="stats"] <-46
d$alsubj2[d$edqsub57=="STATS"] <-46
d$alsubj2[d$edqsub57=="Applied Maths S level"] <-47
d$alsubj2[d$edqsub57=="Maths S/level"] <-46
d$alsubj2[d$edqsub57=="S level maths"] <-46
d$alsubj2[d$edqsub57=="s' level maths"] <-46
d$alsubj2[d$edqsub57=="Step maths"] <-46
d$alsubj2[d$edqsub57=="MEDIA"] <-48
d$alsubj2[d$edqsub57=="Media studies"] <-48
d$alsubj2[d$edqsub57=="music"] <-49
d$alsubj2[d$edqsub57=="Music"] <-49
d$alsubj2[d$edqsub57=="MUSIC"] <-49
d$alsubj2[d$edqsub57=="music practical"] <-49
d$alsubj2[d$edqsub57=="music theory"] <-49
d$alsubj2[d$edqsub57=="Practical music"] <-49
d$alsubj2[d$edqsub57=="Rudiments of Music"] <-49
d$alsubj2[d$edqsub57=="STAGE DECOR AND COSTUME D"] <-50
d$alsubj2[d$edqsub57=="FINANCIAL CONTROL"] <-50
d$alsubj2[d$edqsub57=="ceramics"] <-51
d$alsubj2[d$edqsub57=="CRAFT"] <-51
d$alsubj2[d$edqsub57=="CRAFT DESIGN & THEATRE ST"] <-51
d$alsubj2[d$edqsub57=="POTTERY"] <-51
d$alsubj2[d$edqsub57=="printing"] <-52
d$alsubj2[d$edqsub57=="TEXTILE AND DRESS"] <-52
d$alsubj2[d$edqsub57=="DRESS"] <-52
d$alsubj2[d$edqsub57=="dress and design"] <-52
d$alsubj2[d$edqsub57=="FOOD AND NUTRITION"] <-52
d$alsubj2[d$edqsub57=="food and nutrition"] <-52
d$alsubj2[d$edqsub57=="home econimics"] <-52
d$alsubj2[d$edqsub57=="home economic"] <-52
d$alsubj2[d$edqsub57=="HOME ECONOMICS"] <-52
d$alsubj2[d$edqsub57=="Home Economics"] <-52
d$alsubj2[d$edqsub57=="home economics"] <-52
d$alsubj2[d$edqsub57=="home economics - sewing"] <-52
d$alsubj2[d$edqsub57=="Home economics."] <-52
d$alsubj2[d$edqsub57=="HOME, FAMILY AND SOCIETY"] <-52
d$alsubj2[d$edqsub57=="HOME, FAMILY AND SOCIETY"] <-52
d$alsubj2[d$edqsub57=="CONFECTIONERY TECHNOLOGY"] <-52
d$alsubj2[d$edqsub57=="cookery"] <-52
d$alsubj2[d$edqsub57=="COOKERY"] <-52
d$alsubj2[d$edqsub57=="Domestic Science"] <-52
d$alsubj2[d$edqsub57=="surveying"] <-52
d$alsubj2[d$edqsub57=="tech drawing"] <-52
d$alsubj2[d$edqsub57=="TECH DRAWING"] <-52
d$alsubj2[d$edqsub57=="tech drawing"] <-52
d$alsubj2[d$edqsub57=="TECHNICAL DRAWING"] <-52
d$alsubj2[d$edqsub57=="technical drawing"] <-52
d$alsubj2[d$edqsub57=="Technical DRawing"] <-52
d$alsubj2[d$edqsub57=="technical drawing"] <-52
d$alsubj2[d$edqsub57=="Technical Drawing"] <-52
d$alsubj2[d$edqsub57=="BUILDING CONSTRUCTION"] <-52
d$alsubj2[d$edqsub57=="building construction"] <-52
d$alsubj2[d$edqsub57=="Needlework"] <-52
d$alsubj2[d$edqsub57== "stage craft and design"] <-52
d$alsubj2[d$edqsub57=="SECIENE"] <-62
d$alsubj2[d$edqsub57=="Health Scencie"] <-62
d$alsubj2[d$edqsub57=="HEALTH STUDIES"] <-62
d$alsubj2[d$edqsub57=="Science in Society"] <-62
d$alsubj2[d$edqsub57=="philosophy"] <-54
d$alsubj2[d$edqsub57=="Philosophy"] <-54
d$alsubj2[d$edqsub57=="PHILOSOPHY"] <-54
d$alsubj2[d$edqsub57=="philosphy"] <-54
d$alsubj2[d$edqsub57=="phisics"] <-56
d$alsubj2[d$edqsub57=="PHOTOGRAPHY"] <-55
d$alsubj2[d$edqsub57=="photography"] <-55
d$alsubj2[d$edqsub57=="physical education"] <-68
d$alsubj2[d$edqsub57=="PHYSICAL EDUCATION"] <-68
d$alsubj2[d$edqsub57=="HPYSICS"] <-56
d$alsubj2[d$edqsub57=="PHSICS"] <-56
d$alsubj2[d$edqsub57=="phsics"] <-56
d$alsubj2[d$edqsub57=="phsyics"] <-56
d$alsubj2[d$edqsub57=="phycics"] <-56
d$alsubj2[d$edqsub57=="PHYS"] <-56
d$alsubj2[d$edqsub57=="phys/  maths"] <-56
d$alsubj2[d$edqsub57=="PHYSIC"] <-56
d$alsubj2[d$edqsub57=="PHYSICA"] <-56
d$alsubj2[d$edqsub57=="Physiccs"] <-56
d$alsubj2[d$edqsub57=="Physics"] <-56
d$alsubj2[d$edqsub57=="PHYSICS"] <-56
d$alsubj2[d$edqsub57=="physics"] <-56
d$alsubj2[d$edqsub57=="PHYSICS A LEVEL"] <-56
d$alsubj2[d$edqsub57=="PHYSICS WITH ELECTRONICS"] <-56
d$alsubj2[d$edqsub57=="Physics."] <-56
d$alsubj2[d$edqsub57=="PHYSYCS"] <-56
d$alsubj2[d$edqsub57=="pyschics"] <-56
d$alsubj2[d$edqsub57=="PYSICS"] <-56
d$alsubj2[d$edqsub57=="PHICS"] <-56
d$alsubj2[d$edqsub57=="physics (s)"] <-57
d$alsubj2[d$edqsub57=="Physics S/level"] <-57
d$alsubj2[d$edqsub57=="PHYSICS STEP"] <-57
d$alsubj2[d$edqsub57=="British and American Poli"] <-36
d$alsubj2[d$edqsub57=="BRITISH GOV AND POLITICS"] <-36
d$alsubj2[d$edqsub57=="BRITISH GOVERN AND POLITI"] <-36
d$alsubj2[d$edqsub57=="British government"] <-36
d$alsubj2[d$edqsub57=="british government and po"] <-36
d$alsubj2[d$edqsub57=="British Government l& Pol"] <-36
d$alsubj2[d$edqsub57=="British Govt and politics"] <-36
d$alsubj2[d$edqsub57=="polatics and government"] <-36
d$alsubj2[d$edqsub57=="POLICTICAL HISTORY"] <-36
d$alsubj2[d$edqsub57=="POLITICAL AND ECONOMIC ST"] <-36
d$alsubj2[d$edqsub57=="Political History"] <-36
d$alsubj2[d$edqsub57=="political History"] <-36
d$alsubj2[d$edqsub57=="political history"] <-36
d$alsubj2[d$edqsub57=="political science"] <-36
d$alsubj2[d$edqsub57=="Political Studies"] <-36
d$alsubj2[d$edqsub57=="political studiesd"] <-36
d$alsubj2[d$edqsub57=="politics"] <-36
d$alsubj2[d$edqsub57=="POLITICS"] <-36
d$alsubj2[d$edqsub57=="Politics"] <-36
d$alsubj2[d$edqsub57=="politics & economics"] <-36
d$alsubj2[d$edqsub57=="politics & government"] <-36
d$alsubj2[d$edqsub57=="politics and government"] <-36
d$alsubj2[d$edqsub57=="Politics."] <-36
d$alsubj2[d$edqsub57=="Phsychology"] <-59
d$alsubj2[d$edqsub57=="phsycology"] <-59
d$alsubj2[d$edqsub57=="phychology"] <-59
d$alsubj2[d$edqsub57=="PHYCOLOGY"] <-59
d$alsubj2[d$edqsub57=="phycology"] <-59
d$alsubj2[d$edqsub57=="physchology"] <-59
d$alsubj2[d$edqsub57=="Physchology"] <-59
d$alsubj2[d$edqsub57=="physclogy"] <-59
d$alsubj2[d$edqsub57=="Physco;ogy"] <-59
d$alsubj2[d$edqsub57=="PHYSCOLOGY"] <-59
d$alsubj2[d$edqsub57=="physology"] <-59
d$alsubj2[d$edqsub57=="pschology"] <-59
d$alsubj2[d$edqsub57=="pschology"] <-59
d$alsubj2[d$edqsub57=="pshycoclgy"] <-59
d$alsubj2[d$edqsub57=="PSYCHOLOGY"] <-59
d$alsubj2[d$edqsub57=="psychology"] <-59
d$alsubj2[d$edqsub57=="Psychology"] <-59
d$alsubj2[d$edqsub57=="Psycology"] <-59
d$alsubj2[d$edqsub57=="PSYCOLOGY"] <-59
d$alsubj2[d$edqsub57=="public affairs"] <-36
d$alsubj2[d$edqsub57=="PYSCOLOGY"] <-59
d$alsubj2[d$edqsub57=="Divinity"] <-60
d$alsubj2[d$edqsub57=="DIVINITY"] <-60
d$alsubj2[d$edqsub57=="r.e"] <-60
d$alsubj2[d$edqsub57=="R.E."] <-60
d$alsubj2[d$edqsub57=="R.e."] <-60
d$alsubj2[d$edqsub57=="RE"] <-60
d$alsubj2[d$edqsub57=="re"] <-60
d$alsubj2[d$edqsub57=="REL. STUDIES"] <-60
d$alsubj2[d$edqsub57=="relegious studies"] <-60
d$alsubj2[d$edqsub57=="philosi"] <-54
d$alsubj2[d$edqsub57=="RELIG STUDIES"] <-60
d$alsubj2[d$edqsub57=="religeous studies"] <-60
d$alsubj2[d$edqsub57=="religious education"] <-60
d$alsubj2[d$edqsub57=="Religious Education"] <-60
d$alsubj2[d$edqsub57=="RELIGIOUS EDUCATION"] <-60
d$alsubj2[d$edqsub57=="religious education"] <-60
d$alsubj2[d$edqsub57=="religious knowledge"] <-60
d$alsubj2[d$edqsub57=="religious studies"] <-60
d$alsubj2[d$edqsub57=="RELIGIOUS STUDIES"] <-60
d$alsubj2[d$edqsub57=="Religious studies"] <-60
d$alsubj2[d$edqsub57=="religous"] <-60
d$alsubj2[d$edqsub57=="Religous Education"] <-60
d$alsubj2[d$edqsub57=="scriptire"] <-60
d$alsubj2[d$edqsub57=="theology"] <-60
d$alsubj2[d$edqsub57=="russian"] <-61
d$alsubj2[d$edqsub57=="secretarial"] <-63
d$alsubj2[d$edqsub57=="SECRETARIAL"] <-63
d$alsubj2[d$edqsub57=="SECRETARIAL STUDIES"] <-63
d$alsubj2[d$edqsub57=="Secretarial studies"] <-63
d$alsubj2[d$edqsub57=="SOCIAL BIOLOGY"] <-62
d$alsubj2[d$edqsub57=="social biology"] <-62
d$alsubj2[d$edqsub57=="Social biology"] <-62
d$alsubj2[d$edqsub57=="Social Biology"] <-62
d$alsubj2[d$edqsub57=="SOCIAL POLICY ADMIN"] <-64
d$alsubj2[d$edqsub57=="SOCIAL POLICY"] <-64
d$alsubj2[d$edqsub57=="Social sciences"] <-65
d$alsubj2[d$edqsub57=="social studies"] <-65
d$alsubj2[d$edqsub57=="health and social care"] <-65
d$alsubj2[d$edqsub57=="SOCIALGY"] <-66
d$alsubj2[d$edqsub57=="socialogy"] <-66
d$alsubj2[d$edqsub57=="SOCIALOGY"] <-66
d$alsubj2[d$edqsub57=="Socialolgy"] <-66
d$alsubj2[d$edqsub57=="socialologu"] <-66
d$alsubj2[d$edqsub57=="Socialology"] <-66
d$alsubj2[d$edqsub57=="SOCIOLGY"] <-66
d$alsubj2[d$edqsub57=="socioligy"] <-66
d$alsubj2[d$edqsub57=="sociolocy"] <-66
d$alsubj2[d$edqsub57=="SOCIOLOGOY"] <-66
d$alsubj2[d$edqsub57=="SOCIOLOGY"] <-66
d$alsubj2[d$edqsub57=="Sociology"] <-66
d$alsubj2[d$edqsub57=="sociology"] <-66
d$alsubj2[d$edqsub57=="SOCIOPLOGY"] <-66
d$alsubj2[d$edqsub57=="spanish"] <-67
d$alsubj2[d$edqsub57=="Spanish"] <-67
d$alsubj2[d$edqsub57=="SPANISH"] <-67
d$alsubj2[d$edqsub57=="spannish"] <-67
d$alsubj2[d$edqsub57=="sports studies"] <-68
d$alsubj2[d$edqsub57=="SPORTS STUDIES"] <-68
d$alsubj2[d$edqsub57=="Sports Studies"] <-68
d$alsubj2[d$edqsub57=="theater studies"] <-69
d$alsubj2[d$edqsub57=="Theatre Arts"] <-69
d$alsubj2[d$edqsub57=="THEATRE STUDIEAS"] <-69
d$alsubj2[d$edqsub57=="theatre studies"] <-69
d$alsubj2[d$edqsub57=="Theatre studies"] <-69
d$alsubj2[d$edqsub57=="Theatre Studies"] <-69
d$alsubj2[d$edqsub57=="THEATRE STUDIES"] <-69
d$alsubj2[d$edqsub57=="theatre studys"] <-69
d$alsubj2[d$edqsub57=="theatre stuides"] <-69
d$alsubj2[d$edqsub57=="Urban Studies"] <-51
d$alsubj2[d$edqsub57=="Urdu"] <-70
d$alsubj2[d$edqsub57=="welsh"] <-71
d$alsubj2[d$edqsub57=="WELSH"] <-71
d$alsubj2[d$edqsub57=="war and society"] <-51
d$alsubj2[d$edqsub57=="ZOOLOGY"] <-62
d$alsubj2[d$edqsub57=="zoology"] <-62
d$alsubj2[d$edqsub57=="MANAGEMENT"] <-51
d$alsubj2[d$edqsub57=="modern studies"] <-51
d$alsubj2[d$edqsub57=="MODERN STUDIES"] <-51

# A-level subject 3
d$alsubj3<-NA
d$alsubj3[d$edqsub58=="ACCOUNT AND BUSINESS"] <-1
d$alsubj3[d$edqsub58=="ACCOUNTANCY"] <-1
d$alsubj3[d$edqsub58=="accountancy"] <-1
d$alsubj3[d$edqsub58=="Accountancy"] <-1
d$alsubj3[d$edqsub58=="accountancy"] <-1
d$alsubj3[d$edqsub58=="Accounting"] <-1
d$alsubj3[d$edqsub58=="Accounts"] <-1
d$alsubj3[d$edqsub58=="accounts"] <-1
d$alsubj3[d$edqsub58=="ACCOUNTS"] <-1
d$alsubj3[d$edqsub58=="accounts(business studies"] <-1
d$alsubj3[d$edqsub58=="acounts"] <-1
d$alsubj3[d$edqsub58=="ancient greek"] 		<-2
d$alsubj3[d$edqsub58=="ancient history"] <-3
d$alsubj3[d$edqsub58=="ANCIENT HISTORY"] <-3
d$alsubj3[d$edqsub58=="Ancient History"] <-3
d$alsubj3[d$edqsub58=="ANCIENT HISTORYU"] <-3
d$alsubj3[d$edqsub58=="archaeology"] <-4
d$alsubj3[d$edqsub58=="Archaeology"] <-4
d$alsubj3[d$edqsub58=="2 dimensional art"] <-5
d$alsubj3[d$edqsub58=="art"] <-5
d$alsubj3[d$edqsub58=="3 dimensional art"] <-5
d$alsubj3[d$edqsub58=="Art"] <-5
d$alsubj3[d$edqsub58=="ART"] <-5
d$alsubj3[d$edqsub58=="ARTS"] <-5
d$alsubj3[d$edqsub58=="fine art"] <-5
d$alsubj3[d$edqsub58=="FINE ART"] <-5
d$alsubj3[d$edqsub58=="STUDY OF ART"] <-5
d$alsubj3[d$edqsub58=="Art & Craft"] <-5
d$alsubj3[d$edqsub58=="Art & Design"] <-5
d$alsubj3[d$edqsub58=="art & design technology"] <-5
d$alsubj3[d$edqsub58=="ART 7 DESIGN"] <-5
d$alsubj3[d$edqsub58=="ART AND ART HISTORY"] <-5
d$alsubj3[d$edqsub58=="Art and Art History"] <-5
d$alsubj3[d$edqsub58=="art and crafts"] <-5
d$alsubj3[d$edqsub58=="Art and design"] <-5
d$alsubj3[d$edqsub58=="ART AND DESIGN"] <-5
d$alsubj3[d$edqsub58=="art/design"] <-5
d$alsubj3[d$edqsub58=="art history"] <-5
d$alsubj3[d$edqsub58=="Art History"] <-5
d$alsubj3[d$edqsub58=="art with art history"] <-5
d$alsubj3[d$edqsub58=="ART WITH ART HISTORY"] <-5
d$alsubj3[d$edqsub58=="art/art history"] <-5
d$alsubj3[d$edqsub58=="Art/Art History"] <-5
d$alsubj3[d$edqsub58=="history of aft"] <-5
d$alsubj3[d$edqsub58=="History of art"] <-5
d$alsubj3[d$edqsub58=="History of Art"] <-5
d$alsubj3[d$edqsub58=="bilogy"] <-6
d$alsubj3[d$edqsub58=="biol"] <-6
d$alsubj3[d$edqsub58=="biol;gy"] <-6
d$alsubj3[d$edqsub58=="Biology"] <-6
d$alsubj3[d$edqsub58=="biology"] <-6
d$alsubj3[d$edqsub58=="BIOLOGY"] <-6
d$alsubj3[d$edqsub58=="biology  c"] <-6
d$alsubj3[d$edqsub58=="Biology - retake"] <-6
d$alsubj3[d$edqsub58=="boilogy"] <-6
d$alsubj3[d$edqsub58=="BOTTANY"] <-6
d$alsubj3[d$edqsub58=="practical biology"] <-6
d$alsubj3[d$edqsub58=="theoretical biology"] <-6
d$alsubj3[d$edqsub58=="biology s level"] <-7
d$alsubj3[d$edqsub58=="buisiness studies"] <-11
d$alsubj3[d$edqsub58=="BUISNESS STUDIES"] <-11
d$alsubj3[d$edqsub58=="BUISNESS STUDIES"] <-11
d$alsubj3[d$edqsub58=="buisness studies"] <-11
d$alsubj3[d$edqsub58=="BUISNESS STUDIES"] <-11
d$alsubj3[d$edqsub58=="business"] <-11
d$alsubj3[d$edqsub58=="Business Studies"] <-11
d$alsubj3[d$edqsub58=="BUSINESS STUDIES BIOLOGY"] <-11
d$alsubj3[d$edqsub58=="Business SudiesInform"] <-11
d$alsubj3[d$edqsub58=="CEMISTERY"] <-12
d$alsubj3[d$edqsub58=="CHE M"] <-12
d$alsubj3[d$edqsub58=="CHEM"] <-12
d$alsubj3[d$edqsub58=="Chem"] <-12
d$alsubj3[d$edqsub58=="chem"] <-12
d$alsubj3[d$edqsub58=="chemestry"] <-12
d$alsubj3[d$edqsub58=="CHEMISRTY"] <-12
d$alsubj3[d$edqsub58=="chemisrty"] <-12
d$alsubj3[d$edqsub58=="CHEMISTERY"] <-12
d$alsubj3[d$edqsub58=="chemistrry"] <-12
d$alsubj3[d$edqsub58=="Chemistry"] <-12
d$alsubj3[d$edqsub58=="CHEMISTRY"] <-12
d$alsubj3[d$edqsub58=="Chemistry - retake"] <-12
d$alsubj3[d$edqsub58=="chemistry (s)"] <-12
d$alsubj3[d$edqsub58=="CHEMISTRY A LEVEL"] <-12
d$alsubj3[d$edqsub58=="chemistyr"] <-12
d$alsubj3[d$edqsub58=="CHEMISTYR"] <-12
d$alsubj3[d$edqsub58=="CHEMSTRY"] <-12
d$alsubj3[d$edqsub58=="CHENISTRY"] <-12
d$alsubj3[d$edqsub58=="Chemistry S level"] <-13
d$alsubj3[d$edqsub58=="chemistry s level"] <-13
d$alsubj3[d$edqsub58=="Chemistry -S level"] <-13
d$alsubj3[d$edqsub58=="s' level chemestry"] <-13
d$alsubj3[d$edqsub58=="Special Chemistry"] <-13
d$alsubj3[d$edqsub58=="clasical civilisation"] <-14
d$alsubj3[d$edqsub58=="clasics"] <-14
d$alsubj3[d$edqsub58=="classical civilations"] <-14
d$alsubj3[d$edqsub58=="classical civilisation"] <-14
d$alsubj3[d$edqsub58=="CLASSICAL CIVILISATION"] <-14
d$alsubj3[d$edqsub58=="CLASSICAL CIVILISATIONS"] <-14
d$alsubj3[d$edqsub58=="CLASSICAL CIVILIZATION"] <-14
d$alsubj3[d$edqsub58=="CLASSICAL STUDIES"] <-14
d$alsubj3[d$edqsub58=="CLASSICS"] <-15
d$alsubj3[d$edqsub58=="COMMUNICATION STUDIES"] <-16
d$alsubj3[d$edqsub58=="communication studies"] <-16
d$alsubj3[d$edqsub58=="COMMUNICATIONS"] <-16
d$alsubj3[d$edqsub58=="COMMUNICATIONS STUDIES"] <-16
d$alsubj3[d$edqsub58=="Communications studies"] <-16
d$alsubj3[d$edqsub58=="applied computer science"] <-17
d$alsubj3[d$edqsub58=="comp studies"] <-17
d$alsubj3[d$edqsub58=="COMPTUTING SKILLS"] <-17
d$alsubj3[d$edqsub58=="COMPUTER PROGRAMMING"] <-17
d$alsubj3[d$edqsub58=="Computer Science"] <-17
d$alsubj3[d$edqsub58=="COMPUTER SCIENCE"] <-17
d$alsubj3[d$edqsub58=="computer science"] <-17
d$alsubj3[d$edqsub58=="computer sciences"] <-17
d$alsubj3[d$edqsub58=="Computer Sciencse"] <-17
d$alsubj3[d$edqsub58=="COMPUTER SICENCE"] <-17
d$alsubj3[d$edqsub58=="Computer Studies"] <-17
d$alsubj3[d$edqsub58=="Computer Studies"] <-17
d$alsubj3[d$edqsub58=="computer studies"] <-17
d$alsubj3[d$edqsub58=="Computer studies"] <-17
d$alsubj3[d$edqsub58=="computing"] <-17
d$alsubj3[d$edqsub58=="Computing"] <-17
d$alsubj3[d$edqsub58=="coputer science"] <-17
d$alsubj3[d$edqsub58=="information Technology"] <-17
d$alsubj3[d$edqsub58=="IT"] <-17
d$alsubj3[d$edqsub58=="Computer science S level"] <-18
d$alsubj3[d$edqsub58=="craft design and technolo"] <-19
d$alsubj3[d$edqsub58=="Design"] <-19
d$alsubj3[d$edqsub58=="design"] <-19
d$alsubj3[d$edqsub58=="DESIGN"] <-19
d$alsubj3[d$edqsub58=="dESIGN & tECHNOLGY"] <-19
d$alsubj3[d$edqsub58=="Design & Technology"] <-19
d$alsubj3[d$edqsub58=="design and technology"] <-19
d$alsubj3[d$edqsub58=="Design and Technology"] <-19
d$alsubj3[d$edqsub58=="design craft and technolo"] <-19
d$alsubj3[d$edqsub58=="design technology"] <-19
d$alsubj3[d$edqsub58=="DESIGN TECHNOLOGY"] <-19
d$alsubj3[d$edqsub58=="c.d.t"] <-19
d$alsubj3[d$edqsub58=="technology"] <-19
d$alsubj3[d$edqsub58=="Technology"] <-19
d$alsubj3[d$edqsub58=="DRAMA"] <-20
d$alsubj3[d$edqsub58=="Drama"] <-20
d$alsubj3[d$edqsub58=="drama and theatre arts"] <-20
d$alsubj3[d$edqsub58=="dance"] <-20
d$alsubj3[d$edqsub58=="Dance and Drama"] <-20
d$alsubj3[d$edqsub58=="ECCONOMICS"] <-21
d$alsubj3[d$edqsub58=="ecomics"] <-21
d$alsubj3[d$edqsub58=="ECOMICS"] <-21
d$alsubj3[d$edqsub58=="ecomincs"] <-21
d$alsubj3[d$edqsub58=="Ecomonics"] <-21
d$alsubj3[d$edqsub58=="ecomopmics"] <-21
d$alsubj3[d$edqsub58=="econ"] <-21
d$alsubj3[d$edqsub58=="ECON"] <-21
d$alsubj3[d$edqsub58=="ECONIICS"] <-21
d$alsubj3[d$edqsub58=="Econimics"] <-21
d$alsubj3[d$edqsub58=="econimics"] <-21
d$alsubj3[d$edqsub58=="Econimins"] <-21
d$alsubj3[d$edqsub58=="Econmics"] <-21
d$alsubj3[d$edqsub58=="econo;mics"] <-21
d$alsubj3[d$edqsub58=="ECONOMIC"] <-21
d$alsubj3[d$edqsub58=="Economic"] <-21
d$alsubj3[d$edqsub58=="economic and social histo"] <-21
d$alsubj3[d$edqsub58=="economices"] <-21
d$alsubj3[d$edqsub58=="economics"] <-21
d$alsubj3[d$edqsub58=="Economics"] <-21
d$alsubj3[d$edqsub58=="ECONOMICS"] <-21
d$alsubj3[d$edqsub58=="economics & politics"] <-21
d$alsubj3[d$edqsub58=="Economics & World Affairs"] <-21
d$alsubj3[d$edqsub58=="economics with politics"] <-21
d$alsubj3[d$edqsub58=="economicse"] <-21
d$alsubj3[d$edqsub58=="economis and world affair"] <-21
d$alsubj3[d$edqsub58=="Ecvonomics"] <-21
d$alsubj3[d$edqsub58=="encominics"] <-21
d$alsubj3[d$edqsub58=="ECONOMICS AT S LEVEL"] <-22
d$alsubj3[d$edqsub58=="Electronic Systems"] <-23
d$alsubj3[d$edqsub58=="ELECTRONIC\S#"] <-23
d$alsubj3[d$edqsub58=="eLECTRONICS"] <-23
d$alsubj3[d$edqsub58=="Electronics"] <-23
d$alsubj3[d$edqsub58=="electronics"] <-23
d$alsubj3[d$edqsub58=="ELECTRONICS"] <-23
d$alsubj3[d$edqsub58=="Electronics"] <-23
d$alsubj3[d$edqsub58=="electronics/statistics"] <-23
d$alsubj3[d$edqsub58=="microelectronics"] <-23
d$alsubj3[d$edqsub58=="ENGINEERING"] <-24
d$alsubj3[d$edqsub58=="ENGINEERING DRAWING"] <-24
d$alsubj3[d$edqsub58=="Engineering Drawing"] <-24
d$alsubj3[d$edqsub58=="Engineering drawing"] <-24
d$alsubj3[d$edqsub58=="engineering drawing"] <-24
d$alsubj3[d$edqsub58=="ENGINEERING DRAWING AND D"] <-24
d$alsubj3[d$edqsub58=="ENGINEERING METALWORK"] <-24
d$alsubj3[d$edqsub58=="ENGINEERING SCIENCE"] <-24
d$alsubj3[d$edqsub58=="Geometric and Engineering"] <-24
d$alsubj3[d$edqsub58=="combined english"] <-25
d$alsubj3[d$edqsub58=="ebglish"] <-25
d$alsubj3[d$edqsub58=="En g Lit"] <-25
d$alsubj3[d$edqsub58=="eng"] <-25
d$alsubj3[d$edqsub58=="ENG"] <-25
d$alsubj3[d$edqsub58=="ENG .LIT"] <-25
d$alsubj3[d$edqsub58=="eng lang"] <-25
d$alsubj3[d$edqsub58=="ENG LANG"] <-25
d$alsubj3[d$edqsub58=="Eng Lang"] <-25
d$alsubj3[d$edqsub58=="eng language/literature"] <-25
d$alsubj3[d$edqsub58=="ENG LIT"] <-25
d$alsubj3[d$edqsub58=="eng lit"] <-25
d$alsubj3[d$edqsub58=="Eng lit"] <-25
d$alsubj3[d$edqsub58=="eng lit."] <-25
d$alsubj3[d$edqsub58=="eng Slevel"] <-25
d$alsubj3[d$edqsub58=="Eng. Lit"] <-25
d$alsubj3[d$edqsub58=="ENG. LIT"] <-25
d$alsubj3[d$edqsub58=="Eng. Lit."] <-25
d$alsubj3[d$edqsub58=="ENG.LIT 1"] <-25
d$alsubj3[d$edqsub58=="eng.lit."] <-25
d$alsubj3[d$edqsub58=="eng/language."] <-25
d$alsubj3[d$edqsub58=="engl"] <-25
d$alsubj3[d$edqsub58=="English"] <-25
d$alsubj3[d$edqsub58=="ENGLISH"] <-25
d$alsubj3[d$edqsub58=="english"] <-25
d$alsubj3[d$edqsub58=="English  lit."] <-25
d$alsubj3[d$edqsub58=="English  lit."] <-25
d$alsubj3[d$edqsub58=="English (Literature)"] <-25
d$alsubj3[d$edqsub58=="ENGLISH ;LITERATURE"] <-25
d$alsubj3[d$edqsub58=="ENGLISH LANG"] <-25
d$alsubj3[d$edqsub58=="english lang"] <-25
d$alsubj3[d$edqsub58=="ENGLISH LANG & LIT"] <-25
d$alsubj3[d$edqsub58=="English Lang and Lit"] <-25
d$alsubj3[d$edqsub58=="English Lang."] <-25
d$alsubj3[d$edqsub58=="english lang.& lit."] <-25
d$alsubj3[d$edqsub58=="English lang/lit"] <-25
d$alsubj3[d$edqsub58=="ENGLISH LANG/LIT"] <-25
d$alsubj3[d$edqsub58=="english language"] <-25
d$alsubj3[d$edqsub58=="English Language"] <-25
d$alsubj3[d$edqsub58=="english language"] <-25
d$alsubj3[d$edqsub58=="ENGLISH LANGUAGE"] <-25
d$alsubj3[d$edqsub58=="English language"] <-25
d$alsubj3[d$edqsub58=="english Language"] <-25
d$alsubj3[d$edqsub58=="English language & Litera"] <-25
d$alsubj3[d$edqsub58=="english language & litera"] <-25
d$alsubj3[d$edqsub58=="ENGLISH LANGUAGE AND LIT"] <-25
d$alsubj3[d$edqsub58=="ENGLISH LANGUAGE AND LITE"] <-25
d$alsubj3[d$edqsub58=="english language/literatu"] <-25
d$alsubj3[d$edqsub58=="english lit"] <-25
d$alsubj3[d$edqsub58=="ENGLISH LIT"] <-25
d$alsubj3[d$edqsub58=="English Lit"] <-25
d$alsubj3[d$edqsub58=="english lit and lang"] <-25
d$alsubj3[d$edqsub58=="ENGLISH LIT AND LANGUAGE"] <-25
d$alsubj3[d$edqsub58=="english lit."] <-25
d$alsubj3[d$edqsub58=="English lit."] <-25
d$alsubj3[d$edqsub58=="ENGLISH LIT."] <-25
d$alsubj3[d$edqsub58=="English lit/lang"] <-25
d$alsubj3[d$edqsub58=="english litand language"] <-25
d$alsubj3[d$edqsub58=="english litature"] <-25
d$alsubj3[d$edqsub58=="ENGLISH LITERATURE"] <-25
d$alsubj3[d$edqsub58=="English Literature"] <-25
d$alsubj3[d$edqsub58=="english literature"] <-25
d$alsubj3[d$edqsub58=="English literature"] <-25
d$alsubj3[d$edqsub58=="English Literature & Lang"] <-25
d$alsubj3[d$edqsub58=="ENGLISH LITERATURE & LANG"] <-25
d$alsubj3[d$edqsub58=="English Literature/Lang."] <-25
d$alsubj3[d$edqsub58=="English Litereature"] <-25
d$alsubj3[d$edqsub58=="ENGLISH LITERTURA"] <-25
d$alsubj3[d$edqsub58=="English Litterature"] <-25
d$alsubj3[d$edqsub58=="english not specific"] <-25
d$alsubj3[d$edqsub58=="ENLISH"] <-25
d$alsubj3[d$edqsub58=="ENLISH LANGUAGE/LITERATUR"] <-25
d$alsubj3[d$edqsub58=="Environmental Sc"] <-62
d$alsubj3[d$edqsub58=="environmental science"] <-62
d$alsubj3[d$edqsub58=="Environmental Studies"] <-62
d$alsubj3[d$edqsub58=="Fashion"] <-52
d$alsubj3[d$edqsub58=="fashion"] <-52
d$alsubj3[d$edqsub58=="Fashion & textiles"] <-52
d$alsubj3[d$edqsub58=="fashion and design"] <-52
d$alsubj3[d$edqsub58=="fashion and fabric"] <-52
d$alsubj3[d$edqsub58=="Fashion design"] <-52
d$alsubj3[d$edqsub58=="film studies"]					<-26
d$alsubj3[d$edqsub58=="FILM STUDIES"] <-26
d$alsubj3[d$edqsub58=="freanch"] <-27
d$alsubj3[d$edqsub58=="frech"	] <-27
d$alsubj3[d$edqsub58=="FRENCH"] <-27
d$alsubj3[d$edqsub58=="french"] <-27
d$alsubj3[d$edqsub58=="French"] <-27
d$alsubj3[d$edqsub58=="french for business"] <-27
d$alsubj3[d$edqsub58=="french lang"]					<-27		
d$alsubj3[d$edqsub58=="French Literature"] <-27
d$alsubj3[d$edqsub58=="FRENCH1"] <-27
d$alsubj3[d$edqsub58=="French S level"] <-28
d$alsubj3[d$edqsub58=="Furhther Maths"] <-29
d$alsubj3[d$edqsub58=="further math"] <-29
d$alsubj3[d$edqsub58=="further mathematics"] <-29
d$alsubj3[d$edqsub58=="Further mathematics"] <-29
d$alsubj3[d$edqsub58=="FURTHER MATHEMATICS"] <-29
d$alsubj3[d$edqsub58=="Further Mathematics"] <-29
d$alsubj3[d$edqsub58=="further maths"] <-29
d$alsubj3[d$edqsub58=="Further Maths"] <-29
d$alsubj3[d$edqsub58=="Futher maths"] <-29
d$alsubj3[d$edqsub58=="FURTHER MATHS"] <-29
d$alsubj3[d$edqsub58=="FURTHER MATH"] <-29
d$alsubj3[d$edqsub58=="Further Maths - Pure and"] <-29
d$alsubj3[d$edqsub58=="FURTHER MATHS A LEVEL"] <-29
d$alsubj3[d$edqsub58=="FUTHER MATHS"] <-29
d$alsubj3[d$edqsub58=="further maths (s)"] <-30
d$alsubj3[d$edqsub58=="FURTHER MATHS S LEVEL"] <-30
d$alsubj3[d$edqsub58=="FURTHER MATHS STEP"] <-30
d$alsubj3[d$edqsub58=="S level further maths"] <-30
d$alsubj3[d$edqsub58=="GEN STUD"] <-31
d$alsubj3[d$edqsub58=="gen stud"] <-31
d$alsubj3[d$edqsub58=="gen studies"] <-31
d$alsubj3[d$edqsub58=="GEN STUDIES"] <-31
d$alsubj3[d$edqsub58=="Gen studies"] <-31
d$alsubj3[d$edqsub58=="Gen Studies"] <-31
d$alsubj3[d$edqsub58=="GEN STUDIES RELIGIOUS STU"] <-31
d$alsubj3[d$edqsub58=="gen. studies"] <-31
d$alsubj3[d$edqsub58=="gen.studies"] <-31
d$alsubj3[d$edqsub58=="general"] <-31
d$alsubj3[d$edqsub58=="GENERAL"] <-31
d$alsubj3[d$edqsub58=="general   studies"] <-31
d$alsubj3[d$edqsub58=="general  tudies"] <-31
d$alsubj3[d$edqsub58=="general knowl;edfge"] <-31
d$alsubj3[d$edqsub58=="GENERAL STIUDIES"] <-31
d$alsubj3[d$edqsub58=="GENERAL STUDIES"] <-31
d$alsubj3[d$edqsub58=="general studies"] <-31
d$alsubj3[d$edqsub58=="General studies"] <-31
d$alsubj3[d$edqsub58=="General Studies"] <-31
d$alsubj3[d$edqsub58=="GENERAL STUDY"] <-31
d$alsubj3[d$edqsub58=="general study"] <-31
d$alsubj3[d$edqsub58=="general studys"] <-31
d$alsubj3[d$edqsub58=="Genereal Studies"] <-31
d$alsubj3[d$edqsub58=="genstudies"] <-31
d$alsubj3[d$edqsub58=="1GEOGRAPHY"] <-32
d$alsubj3[d$edqsub58=="gegraphy"] <-32
d$alsubj3[d$edqsub58=="GEGRAPHY"] <-32
d$alsubj3[d$edqsub58=="geoagraphy"] <-32
d$alsubj3[d$edqsub58=="geog"] <-32
d$alsubj3[d$edqsub58=="Geog"] <-32
d$alsubj3[d$edqsub58=="GEOG"] <-32
d$alsubj3[d$edqsub58=="GEOGHRAY"] <-32
d$alsubj3[d$edqsub58=="geogr"] <-32
d$alsubj3[d$edqsub58=="GEOGRAGHY"] <-32
d$alsubj3[d$edqsub58=="GEOGRAHY"] <-32
d$alsubj3[d$edqsub58=="geographt"] <-32
d$alsubj3[d$edqsub58=="GEOGRAPHY"] <-32
d$alsubj3[d$edqsub58=="Geography"] <-32
d$alsubj3[d$edqsub58=="geography"] <-32
d$alsubj3[d$edqsub58=="geography grade d"] <-32
d$alsubj3[d$edqsub58=="geographyy"] <-32
d$alsubj3[d$edqsub58=="geograqphy"] <-32
d$alsubj3[d$edqsub58=="geophraphy"] <-32
d$alsubj3[d$edqsub58=="gepgraphy"] <-32
d$alsubj3[d$edqsub58=="GOEG"] <-32
d$alsubj3[d$edqsub58=="goegraphy"] <-32
d$alsubj3[d$edqsub58=="goegraphy"] <-32
d$alsubj3[d$edqsub58=="geog   s level"] <-33
d$alsubj3[d$edqsub58=="geog s level"] <-33
d$alsubj3[d$edqsub58=="GEOGRAPHY S LEVEL"] <-33
d$alsubj3[d$edqsub58=="geography s level"] <-33
d$alsubj3[d$edqsub58=="geology"] <-34
d$alsubj3[d$edqsub58=="Geology"] <-34
d$alsubj3[d$edqsub58=="GEOLOGY"] <-34
d$alsubj3[d$edqsub58=="German"] <-35
d$alsubj3[d$edqsub58=="german"] <-35
d$alsubj3[d$edqsub58=="GERMAN"] <-35
d$alsubj3[d$edqsub58=="German S level"] <-35
d$alsubj3[d$edqsub58=="German."] <-35
d$alsubj3[d$edqsub58=="gevernment politics"] <-36
d$alsubj3[d$edqsub58=="govenment and politics"] <-36
d$alsubj3[d$edqsub58=="GOVERNMENT"] <-36
d$alsubj3[d$edqsub58=="Government & politics"] <-36
d$alsubj3[d$edqsub58=="GOVERNMENT & POLITICS"] <-36
d$alsubj3[d$edqsub58=="GOVERNMENT & POLITICS"] <-36
d$alsubj3[d$edqsub58=="GOVERNMENT AND POLITICAL"] <-36
d$alsubj3[d$edqsub58=="GOVERNMENT AND POLITICS"] <-36
d$alsubj3[d$edqsub58=="government and politics"] <-36
d$alsubj3[d$edqsub58=="Government and Politics"] <-36
d$alsubj3[d$edqsub58=="GOVERNMENT POLITICS"] <-36
d$alsubj3[d$edqsub58=="governmental politics"] <-36
d$alsubj3[d$edqsub58=="Govrnment and politics"] <-36
d$alsubj3[d$edqsub58=="Govt and politics"] <-36
d$alsubj3[d$edqsub58=="GOVT AND POLITICS"] <-36
d$alsubj3[d$edqsub58=="GOVT. AND POLITICS"] <-36
d$alsubj3[d$edqsub58=="govt/politics"] <-36
d$alsubj3[d$edqsub58=="GRAPHIC \DESIGN"] <-37
d$alsubj3[d$edqsub58=="GRAPHIC DESIGN"] <-37
d$alsubj3[d$edqsub58=="Graphic Design"] <-37
d$alsubj3[d$edqsub58=="graphic design"] <-37
d$alsubj3[d$edqsub58=="graphical communication"] <-37
d$alsubj3[d$edqsub58=="Graphical communication"] <-37
d$alsubj3[d$edqsub58=="gre ke"] <-38
d$alsubj3[d$edqsub58=="GREEK"] <-38
d$alsubj3[d$edqsub58=="greek"] <-38
d$alsubj3[d$edqsub58== "MODERN GREEK"] <-38
d$alsubj3[d$edqsub58==";history"] <-39
d$alsubj3[d$edqsub58=="19 centuary british and e"] <-39
d$alsubj3[d$edqsub58=="American History"] <-39
d$alsubj3[d$edqsub58=="HIDTORY"] <-39
d$alsubj3[d$edqsub58=="hist"] <-39
d$alsubj3[d$edqsub58=="History"] <-39
d$alsubj3[d$edqsub58=="HISTORY"] <-39
d$alsubj3[d$edqsub58=="history"] <-39
d$alsubj3[d$edqsub58=="History (modern)"] <-39
d$alsubj3[d$edqsub58=="History."] <-39
d$alsubj3[d$edqsub58=="Histoy"] <-39
d$alsubj3[d$edqsub58=="histroy"] <-39
d$alsubj3[d$edqsub58=="medeaevil history"] <-39
d$alsubj3[d$edqsub58=="MEDIEVAL HISTORY"] <-39
d$alsubj3[d$edqsub58=="MODERN HISTORY"] <-39
d$alsubj3[d$edqsub58=="Social & Economic History"] <-39
d$alsubj3[d$edqsub58=="Social and economic histo"] <-39
d$alsubj3[d$edqsub58=="HISTORY S LEVEL"] <-40
d$alsubj3[d$edqsub58=="history S level"] <-40
d$alsubj3[d$edqsub58=="hum,an bilogy"] <-62
d$alsubj3[d$edqsub58=="human  biology"] <-62
d$alsubj3[d$edqsub58=="human biology"] <-62
d$alsubj3[d$edqsub58=="Human biology"] <-62
d$alsubj3[d$edqsub58=="Human Biology"] <-62
d$alsubj3[d$edqsub58=="human physiology"] <-62
d$alsubj3[d$edqsub58=="HUMAN BIOLOGY"] <-62
d$alsubj3[d$edqsub58=="HUMAN PHYSIOLOGY"] <-62
d$alsubj3[d$edqsub58=="humanbiology"] <-62
d$alsubj3[d$edqsub58=="humanphysiology"] <-62
d$alsubj3[d$edqsub58=="industrila studies"] <-41
d$alsubj3[d$edqsub58=="Industrial Studies"] <-41
d$alsubj3[d$edqsub58=="Italian"] <-42
d$alsubj3[d$edqsub58=="LATIN"] <-43
d$alsubj3[d$edqsub58=="latin"] <-43
d$alsubj3[d$edqsub58=="Latin"] <-43
d$alsubj3[d$edqsub58=="Latin S level"] <-44
d$alsubj3[d$edqsub58=="latin s level"] <-44
d$alsubj3[d$edqsub58=="LATIN SPECIAL"] <-44
d$alsubj3[d$edqsub58=="English Law."] <-45
d$alsubj3[d$edqsub58=="criminal law"] <-45
d$alsubj3[d$edqsub58=="Law"] <-45
d$alsubj3[d$edqsub58=="law"] <-45
d$alsubj3[d$edqsub58=="LAW"] <-45
d$alsubj3[d$edqsub58=="low"] <-45
d$alsubj3[d$edqsub58=="applied and pure maths"] <-46
d$alsubj3[d$edqsub58=="Applied Mathematics"] <-46
d$alsubj3[d$edqsub58=="applied mathematics"] <-46
d$alsubj3[d$edqsub58=="APPLIED MATHS"] <-46
d$alsubj3[d$edqsub58=="applied maths"] <-46
d$alsubj3[d$edqsub58=="Applied Maths"] <-46
d$alsubj3[d$edqsub58=="combined maths"] <-46
d$alsubj3[d$edqsub58=="Maaths"] <-46
d$alsubj3[d$edqsub58=="Matematics"] <-46
d$alsubj3[d$edqsub58=="MATH"] <-46
d$alsubj3[d$edqsub58=="math"] <-46
d$alsubj3[d$edqsub58=="Math & General knowladge"] <-46
d$alsubj3[d$edqsub58=="Mathematics"] <-46
d$alsubj3[d$edqsub58=="mATHEMATICS"] <-46
d$alsubj3[d$edqsub58=="MATHEMATICS"] <-46
d$alsubj3[d$edqsub58=="mathematics"] <-46
d$alsubj3[d$edqsub58=="MATHEMATICS - PURE/APLIED"] <-46
d$alsubj3[d$edqsub58=="mathematics and art"] <-46
d$alsubj3[d$edqsub58=="Mathematics and Statistic"] <-46
d$alsubj3[d$edqsub58=="Mathematics with stats"] <-46
d$alsubj3[d$edqsub58=="mathematics, pure and app"] <-46
d$alsubj3[d$edqsub58=="MATHMATICS AND STATISTICS"] <-46
d$alsubj3[d$edqsub58=="Maths"] <-46
d$alsubj3[d$edqsub58=="maths"] <-46
d$alsubj3[d$edqsub58=="MATHS"] <-46
d$alsubj3[d$edqsub58=="maths & mechanics"] <-46
d$alsubj3[d$edqsub58=="Maths & Statistics"] <-46
d$alsubj3[d$edqsub58=="maths & statistics"] <-46
d$alsubj3[d$edqsub58=="Maths (pure and Applied)"] <-46
d$alsubj3[d$edqsub58=="Maths /pure and applied"] <-46
d$alsubj3[d$edqsub58=="maths + stats"] <-46
d$alsubj3[d$edqsub58=="MATHS A LEVEL"] <-46
d$alsubj3[d$edqsub58=="maths an"] <-46
d$alsubj3[d$edqsub58=="MATHS AND STATISTICS"] <-46
d$alsubj3[d$edqsub58=="maths and statistics"] <-46
d$alsubj3[d$edqsub58=="Maths and stats"] <-46
d$alsubj3[d$edqsub58=="MATHS AND STATS"] <-46
d$alsubj3[d$edqsub58=="maths AS"] <-46
d$alsubj3[d$edqsub58=="maths pure"] <-46
d$alsubj3[d$edqsub58=="maths pure and applied"] <-46
d$alsubj3[d$edqsub58=="MATHS- PURE AND APPLIED"] <-46
d$alsubj3[d$edqsub58=="Maths pure l& applied"] <-46
d$alsubj3[d$edqsub58=="MATHS S LEVEL"] <-46
d$alsubj3[d$edqsub58=="MATHS WITH STATISTICS"] <-46
d$alsubj3[d$edqsub58=="maths with statistics"] <-46
d$alsubj3[d$edqsub58=="maths with stats"] <-46
d$alsubj3[d$edqsub58=="Maths with stats."] <-46
d$alsubj3[d$edqsub58=="MATHS, PURE AND APPLIED"] <-46
d$alsubj3[d$edqsub58=="maths."] <-46
d$alsubj3[d$edqsub58=="MATHS."] <-46
d$alsubj3[d$edqsub58=="Maths."] <-46
d$alsubj3[d$edqsub58=="Maths/pure and applied"] <-46
d$alsubj3[d$edqsub58=="Maths/Statistics"] <-46
d$alsubj3[d$edqsub58=="MATHSW"] <-46
d$alsubj3[d$edqsub58=="Mathsw"] <-46
d$alsubj3[d$edqsub58=="mechanics"] <-46
d$alsubj3[d$edqsub58=="MMaths"] <-46
d$alsubj3[d$edqsub58=="PURE & APPL MATHS"] <-46
d$alsubj3[d$edqsub58=="Pure & Applied Maths"] <-46
d$alsubj3[d$edqsub58=="pure and applied maths"] <-46
d$alsubj3[d$edqsub58=="PURE AND APPLIED MATHS"] <-46
d$alsubj3[d$edqsub58=="Pure M aths & Statistics"] <-46
d$alsubj3[d$edqsub58=="pure mathematics"] <-46
d$alsubj3[d$edqsub58=="PURE MATHEMATICS"] <-46
d$alsubj3[d$edqsub58=="pure mathematics"] <-46
d$alsubj3[d$edqsub58=="pure maths"] <-46
d$alsubj3[d$edqsub58=="PURE MATHS"] <-46
d$alsubj3[d$edqsub58=="Pure maths"] <-46
d$alsubj3[d$edqsub58=="Pure Maths"] <-46
d$alsubj3[d$edqsub58=="Pure Maths & Mechanics"] <-46
d$alsubj3[d$edqsub58=="Pure Maths & Statistics"] <-46
d$alsubj3[d$edqsub58=="Pure Maths & Stats"] <-46
d$alsubj3[d$edqsub58=="pure maths and statistics"] <-46
d$alsubj3[d$edqsub58=="PURE MATHS AND STATISTICS"] <-46
d$alsubj3[d$edqsub58=="PURE MATHS AND STATS"] <-46
d$alsubj3[d$edqsub58=="pure maths and stats"] <-46
d$alsubj3[d$edqsub58=="PURE MATHS WITH STATISTIC"] <-46
d$alsubj3[d$edqsub58=="pure maths with statistic"] <-46
d$alsubj3[d$edqsub58=="Pure maths with stats"] <-46
d$alsubj3[d$edqsub58=="PURE MATHS WITH STATS"] <-46
d$alsubj3[d$edqsub58=="pure maths with stats."] <-46
d$alsubj3[d$edqsub58=="pure maths witih stats."] <-46
d$alsubj3[d$edqsub58=="pure maths/statistics"] <-46
d$alsubj3[d$edqsub58=="pure/statistal maths"] <-46
d$alsubj3[d$edqsub58=="stastics"] <-46
d$alsubj3[d$edqsub58=="statisics"] <-46
d$alsubj3[d$edqsub58=="STATISTICS"] <-46
d$alsubj3[d$edqsub58=="statistics"] <-46
d$alsubj3[d$edqsub58=="Statistics"] <-46
d$alsubj3[d$edqsub58=="stats"] <-46
d$alsubj3[d$edqsub58=="STATS"] <-46
d$alsubj3[d$edqsub58=="Applied Maths S level"] <-47
d$alsubj3[d$edqsub58=="Maths S/level"] <-46
d$alsubj3[d$edqsub58=="S level maths"] <-46
d$alsubj3[d$edqsub58=="s' level maths"] <-46
d$alsubj3[d$edqsub58=="Step maths"] <-46
d$alsubj3[d$edqsub58=="MEDIA"] <-48
d$alsubj3[d$edqsub58=="Media studies"] <-48
d$alsubj3[d$edqsub58=="music"] <-49
d$alsubj3[d$edqsub58=="Music"] <-49
d$alsubj3[d$edqsub58=="MUSIC"] <-49
d$alsubj3[d$edqsub58=="music practical"] <-49
d$alsubj3[d$edqsub58=="music theory"] <-49
d$alsubj3[d$edqsub58=="Practical music"] <-49
d$alsubj3[d$edqsub58=="Rudiments of Music"] <-49
d$alsubj3[d$edqsub58=="STAGE DECOR AND COSTUME D"] <-50
d$alsubj3[d$edqsub58=="FINANCIAL CONTROL"] <-50
d$alsubj3[d$edqsub58=="ceramics"] <-51
d$alsubj3[d$edqsub58=="CRAFT"] <-51
d$alsubj3[d$edqsub58=="CRAFT DESIGN & THEATRE ST"] <-51
d$alsubj3[d$edqsub58=="POTTERY"] <-51
d$alsubj3[d$edqsub58=="printing"] <-52
d$alsubj3[d$edqsub58=="TEXTILE AND DRESS"] <-52
d$alsubj3[d$edqsub58=="DRESS"] <-52
d$alsubj3[d$edqsub58=="dress and design"] <-52
d$alsubj3[d$edqsub58=="FOOD AND NUTRITION"] <-52
d$alsubj3[d$edqsub58=="food and nutrition"] <-52
d$alsubj3[d$edqsub58=="home econimics"] <-52
d$alsubj3[d$edqsub58=="home economic"] <-52
d$alsubj3[d$edqsub58=="HOME ECONOMICS"] <-52
d$alsubj3[d$edqsub58=="Home Economics"] <-52
d$alsubj3[d$edqsub58=="home economics"] <-52
d$alsubj3[d$edqsub58=="home economics - sewing"] <-52
d$alsubj3[d$edqsub58=="Home economics."] <-52
d$alsubj3[d$edqsub58=="HOME, FAMILY AND SOCIETY"] <-52
d$alsubj3[d$edqsub58=="HOME, FAMILY AND SOCIETY"] <-52
d$alsubj3[d$edqsub58=="CONFECTIONERY TECHNOLOGY"] <-52
d$alsubj3[d$edqsub58=="cookery"] <-52
d$alsubj3[d$edqsub58=="COOKERY"] <-52
d$alsubj3[d$edqsub58=="Domestic Science"] <-52
d$alsubj3[d$edqsub58=="surveying"] <-52
d$alsubj3[d$edqsub58=="tech drawing"] <-52
d$alsubj3[d$edqsub58=="TECH DRAWING"] <-52
d$alsubj3[d$edqsub58=="tech drawing"] <-52
d$alsubj3[d$edqsub58=="TECHNICAL DRAWING"] <-52
d$alsubj3[d$edqsub58=="technical drawing"] <-52
d$alsubj3[d$edqsub58=="Technical DRawing"] <-52
d$alsubj3[d$edqsub58=="technical drawing"] <-52
d$alsubj3[d$edqsub58=="Technical Drawing"] <-52
d$alsubj3[d$edqsub58=="BUILDING CONSTRUCTION"] <-52
d$alsubj3[d$edqsub58=="building construction"] <-52
d$alsubj3[d$edqsub58=="Needlework"] <-52
d$alsubj3[d$edqsub58== "stage craft and design"] <-52
d$alsubj3[d$edqsub58=="SECIENE"] <-62
d$alsubj3[d$edqsub58=="Health Scencie"] <-62
d$alsubj3[d$edqsub58=="HEALTH STUDIES"] <-62
d$alsubj3[d$edqsub58=="Science in Society"] <-62
d$alsubj3[d$edqsub58=="philosophy"] <-54
d$alsubj3[d$edqsub58=="Philosophy"] <-54
d$alsubj3[d$edqsub58=="PHILOSOPHY"] <-54
d$alsubj3[d$edqsub58=="philosphy"] <-54
d$alsubj3[d$edqsub58=="phisics"] <-56
d$alsubj3[d$edqsub58=="PHOTOGRAPHY"] <-55
d$alsubj3[d$edqsub58=="photography"] <-55
d$alsubj3[d$edqsub58=="physical education"] <-68
d$alsubj3[d$edqsub58=="PHYSICAL EDUCATION"] <-68
d$alsubj3[d$edqsub58=="HPYSICS"] <-56
d$alsubj3[d$edqsub58=="PHSICS"] <-56
d$alsubj3[d$edqsub58=="phsics"] <-56
d$alsubj3[d$edqsub58=="phsyics"] <-56
d$alsubj3[d$edqsub58=="phycics"] <-56
d$alsubj3[d$edqsub58=="PHYS"] <-56
d$alsubj3[d$edqsub58=="phys/  maths"] <-56
d$alsubj3[d$edqsub58=="PHYSIC"] <-56
d$alsubj3[d$edqsub58=="PHYSICA"] <-56
d$alsubj3[d$edqsub58=="Physiccs"] <-56
d$alsubj3[d$edqsub58=="Physics"] <-56
d$alsubj3[d$edqsub58=="PHYSICS"] <-56
d$alsubj3[d$edqsub58=="physics"] <-56
d$alsubj3[d$edqsub58=="PHYSICS A LEVEL"] <-56
d$alsubj3[d$edqsub58=="PHYSICS WITH ELECTRONICS"] <-56
d$alsubj3[d$edqsub58=="Physics."] <-56
d$alsubj3[d$edqsub58=="PHYSYCS"] <-56
d$alsubj3[d$edqsub58=="pyschics"] <-56
d$alsubj3[d$edqsub58=="PYSICS"] <-56
d$alsubj3[d$edqsub58=="PHICS"] <-56
d$alsubj3[d$edqsub58=="physics (s)"] <-57
d$alsubj3[d$edqsub58=="Physics S/level"] <-57
d$alsubj3[d$edqsub58=="PHYSICS STEP"] <-57
d$alsubj3[d$edqsub58=="British and American Poli"] <-36
d$alsubj3[d$edqsub58=="BRITISH GOV AND POLITICS"] <-36
d$alsubj3[d$edqsub58=="BRITISH GOVERN AND POLITI"] <-36
d$alsubj3[d$edqsub58=="British government"] <-36
d$alsubj3[d$edqsub58=="british government and po"] <-36
d$alsubj3[d$edqsub58=="British Government l& Pol"] <-36
d$alsubj3[d$edqsub58=="British Govt and politics"] <-36
d$alsubj3[d$edqsub58=="polatics and government"] <-36
d$alsubj3[d$edqsub58=="POLICTICAL HISTORY"] <-36
d$alsubj3[d$edqsub58=="POLITICAL AND ECONOMIC ST"] <-36
d$alsubj3[d$edqsub58=="Political History"] <-36
d$alsubj3[d$edqsub58=="political History"] <-36
d$alsubj3[d$edqsub58=="political history"] <-36
d$alsubj3[d$edqsub58=="political science"] <-36
d$alsubj3[d$edqsub58=="Political Studies"] <-36
d$alsubj3[d$edqsub58=="political studiesd"] <-36
d$alsubj3[d$edqsub58=="politics"] <-36
d$alsubj3[d$edqsub58=="POLITICS"] <-36
d$alsubj3[d$edqsub58=="Politics"] <-36
d$alsubj3[d$edqsub58=="politics & economics"] <-36
d$alsubj3[d$edqsub58=="politics & government"] <-36
d$alsubj3[d$edqsub58=="politics and government"] <-36
d$alsubj3[d$edqsub58=="Politics."] <-36
d$alsubj3[d$edqsub58=="Phsychology"] <-59
d$alsubj3[d$edqsub58=="phsycology"] <-59
d$alsubj3[d$edqsub58=="phychology"] <-59
d$alsubj3[d$edqsub58=="PHYCOLOGY"] <-59
d$alsubj3[d$edqsub58=="phycology"] <-59
d$alsubj3[d$edqsub58=="physchology"] <-59
d$alsubj3[d$edqsub58=="Physchology"] <-59
d$alsubj3[d$edqsub58=="physclogy"] <-59
d$alsubj3[d$edqsub58=="Physco;ogy"] <-59
d$alsubj3[d$edqsub58=="PHYSCOLOGY"] <-59
d$alsubj3[d$edqsub58=="physology"] <-59
d$alsubj3[d$edqsub58=="pschology"] <-59
d$alsubj3[d$edqsub58=="pschology"] <-59
d$alsubj3[d$edqsub58=="pshycoclgy"] <-59
d$alsubj3[d$edqsub58=="PSYCHOLOGY"] <-59
d$alsubj3[d$edqsub58=="psychology"] <-59
d$alsubj3[d$edqsub58=="Psychology"] <-59
d$alsubj3[d$edqsub58=="Psycology"] <-59
d$alsubj3[d$edqsub58=="PSYCOLOGY"] <-59
d$alsubj3[d$edqsub58=="public affairs"] <-36
d$alsubj3[d$edqsub58=="PYSCOLOGY"] <-59
d$alsubj3[d$edqsub58=="Divinity"] <-60
d$alsubj3[d$edqsub58=="DIVINITY"] <-60
d$alsubj3[d$edqsub58=="r.e"] <-60
d$alsubj3[d$edqsub58=="R.E."] <-60
d$alsubj3[d$edqsub58=="R.e."] <-60
d$alsubj3[d$edqsub58=="RE"] <-60
d$alsubj3[d$edqsub58=="re"] <-60
d$alsubj3[d$edqsub58=="REL. STUDIES"] <-60
d$alsubj3[d$edqsub58=="relegious studies"] <-60
d$alsubj3[d$edqsub58=="philosi"] <-54
d$alsubj3[d$edqsub58=="RELIG STUDIES"] <-60
d$alsubj3[d$edqsub58=="religeous studies"] <-60
d$alsubj3[d$edqsub58=="religious education"] <-60
d$alsubj3[d$edqsub58=="Religious Education"] <-60
d$alsubj3[d$edqsub58=="RELIGIOUS EDUCATION"] <-60
d$alsubj3[d$edqsub58=="religious education"] <-60
d$alsubj3[d$edqsub58=="religious knowledge"] <-60
d$alsubj3[d$edqsub58=="religious studies"] <-60
d$alsubj3[d$edqsub58=="RELIGIOUS STUDIES"] <-60
d$alsubj3[d$edqsub58=="Religious studies"] <-60
d$alsubj3[d$edqsub58=="religous"] <-60
d$alsubj3[d$edqsub58=="Religous Education"] <-60
d$alsubj3[d$edqsub58=="scriptire"] <-60
d$alsubj3[d$edqsub58=="theology"] <-60
d$alsubj3[d$edqsub58=="russian"] <-61
d$alsubj3[d$edqsub58=="secretarial"] <-63
d$alsubj3[d$edqsub58=="SECRETARIAL"] <-63
d$alsubj3[d$edqsub58=="SECRETARIAL STUDIES"] <-63
d$alsubj3[d$edqsub58=="Secretarial studies"] <-63
d$alsubj3[d$edqsub58=="SOCIAL BIOLOGY"] <-62
d$alsubj3[d$edqsub58=="social biology"] <-62
d$alsubj3[d$edqsub58=="Social biology"] <-62
d$alsubj3[d$edqsub58=="Social Biology"] <-62
d$alsubj3[d$edqsub58=="SOCIAL POLICY ADMIN"] <-64
d$alsubj3[d$edqsub58=="SOCIAL POLICY"] <-64
d$alsubj3[d$edqsub58=="Social sciences"] <-65
d$alsubj3[d$edqsub58=="social studies"] <-65
d$alsubj3[d$edqsub58=="health and social care"] <-65
d$alsubj3[d$edqsub58=="SOCIALGY"] <-66
d$alsubj3[d$edqsub58=="socialogy"] <-66
d$alsubj3[d$edqsub58=="SOCIALOGY"] <-66
d$alsubj3[d$edqsub58=="Socialolgy"] <-66
d$alsubj3[d$edqsub58=="socialologu"] <-66
d$alsubj3[d$edqsub58=="Socialology"] <-66
d$alsubj3[d$edqsub58=="SOCIOLGY"] <-66
d$alsubj3[d$edqsub58=="socioligy"] <-66
d$alsubj3[d$edqsub58=="sociolocy"] <-66
d$alsubj3[d$edqsub58=="SOCIOLOGOY"] <-66
d$alsubj3[d$edqsub58=="SOCIOLOGY"] <-66
d$alsubj3[d$edqsub58=="Sociology"] <-66
d$alsubj3[d$edqsub58=="sociology"] <-66
d$alsubj3[d$edqsub58=="SOCIOPLOGY"] <-66
d$alsubj3[d$edqsub58=="spanish"] <-67
d$alsubj3[d$edqsub58=="Spanish"] <-67
d$alsubj3[d$edqsub58=="SPANISH"] <-67
d$alsubj3[d$edqsub58=="spannish"] <-67
d$alsubj3[d$edqsub58=="sports studies"] <-68
d$alsubj3[d$edqsub58=="SPORTS STUDIES"] <-68
d$alsubj3[d$edqsub58=="Sports Studies"] <-68
d$alsubj3[d$edqsub58=="theater studies"] <-69
d$alsubj3[d$edqsub58=="Theatre Arts"] <-69
d$alsubj3[d$edqsub58=="THEATRE STUDIEAS"] <-69
d$alsubj3[d$edqsub58=="theatre studies"] <-69
d$alsubj3[d$edqsub58=="Theatre studies"] <-69
d$alsubj3[d$edqsub58=="Theatre Studies"] <-69
d$alsubj3[d$edqsub58=="THEATRE STUDIES"] <-69
d$alsubj3[d$edqsub58=="theatre studys"] <-69
d$alsubj3[d$edqsub58=="theatre stuides"] <-69
d$alsubj3[d$edqsub58=="Urban Studies"] <-51
d$alsubj3[d$edqsub58=="Urdu"] <-70
d$alsubj3[d$edqsub58=="welsh"] <-71
d$alsubj3[d$edqsub58=="WELSH"] <-71
d$alsubj3[d$edqsub58=="war and society"] <-51
d$alsubj3[d$edqsub58=="ZOOLOGY"] <-62
d$alsubj3[d$edqsub58=="zoology"] <-62
d$alsubj3[d$edqsub58=="MANAGEMENT"] <-51
d$alsubj3[d$edqsub58=="modern studies"] <-51
d$alsubj3[d$edqsub58=="MODERN STUDIES"] <-51

# A-level subject 4
d$alsubj4<-NA
d$alsubj4[d$edqsub59=="ACCOUNT AND BUSINESS"] <-1
d$alsubj4[d$edqsub59=="ACCOUNTANCY"] <-1
d$alsubj4[d$edqsub59=="accountancy"] <-1
d$alsubj4[d$edqsub59=="Accountancy"] <-1
d$alsubj4[d$edqsub59=="accountancy"] <-1
d$alsubj4[d$edqsub59=="Accounting"] <-1
d$alsubj4[d$edqsub59=="Accounts"] <-1
d$alsubj4[d$edqsub59=="accounts"] <-1
d$alsubj4[d$edqsub59=="ACCOUNTS"] <-1
d$alsubj4[d$edqsub59=="accounts(business studies"] <-1
d$alsubj4[d$edqsub59=="acounts"] <-1
d$alsubj4[d$edqsub59=="ancient greek"] 		<-2
d$alsubj4[d$edqsub59=="ancient history"] <-3
d$alsubj4[d$edqsub59=="ANCIENT HISTORY"] <-3
d$alsubj4[d$edqsub59=="Ancient History"] <-3
d$alsubj4[d$edqsub59=="ANCIENT HISTORYU"] <-3
d$alsubj4[d$edqsub59=="archaeology"] <-4
d$alsubj4[d$edqsub59=="Archaeology"] <-4
d$alsubj4[d$edqsub59=="2 dimensional art"] <-5
d$alsubj4[d$edqsub59=="art"] <-5
d$alsubj4[d$edqsub59=="3 dimensional art"] <-5
d$alsubj4[d$edqsub59=="Art"] <-5
d$alsubj4[d$edqsub59=="ART"] <-5
d$alsubj4[d$edqsub59=="ARTS"] <-5
d$alsubj4[d$edqsub59=="fine art"] <-5
d$alsubj4[d$edqsub59=="FINE ART"] <-5
d$alsubj4[d$edqsub59=="STUDY OF ART"] <-5
d$alsubj4[d$edqsub59=="Art & Craft"] <-5
d$alsubj4[d$edqsub59=="Art & Design"] <-5
d$alsubj4[d$edqsub59=="art & design technology"] <-5
d$alsubj4[d$edqsub59=="ART 7 DESIGN"] <-5
d$alsubj4[d$edqsub59=="ART AND ART HISTORY"] <-5
d$alsubj4[d$edqsub59=="Art and Art History"] <-5
d$alsubj4[d$edqsub59=="art and crafts"] <-5
d$alsubj4[d$edqsub59=="Art and design"] <-5
d$alsubj4[d$edqsub59=="ART AND DESIGN"] <-5
d$alsubj4[d$edqsub59=="art/design"] <-5
d$alsubj4[d$edqsub59=="art history"] <-5
d$alsubj4[d$edqsub59=="Art History"] <-5
d$alsubj4[d$edqsub59=="art with art history"] <-5
d$alsubj4[d$edqsub59=="ART WITH ART HISTORY"] <-5
d$alsubj4[d$edqsub59=="art/art history"] <-5
d$alsubj4[d$edqsub59=="Art/Art History"] <-5
d$alsubj4[d$edqsub59=="history of aft"] <-5
d$alsubj4[d$edqsub59=="History of art"] <-5
d$alsubj4[d$edqsub59=="History of Art"] <-5
d$alsubj4[d$edqsub59=="bilogy"] <-6
d$alsubj4[d$edqsub59=="biol"] <-6
d$alsubj4[d$edqsub59=="biol;gy"] <-6
d$alsubj4[d$edqsub59=="Biology"] <-6
d$alsubj4[d$edqsub59=="biology"] <-6
d$alsubj4[d$edqsub59=="BIOLOGY"] <-6
d$alsubj4[d$edqsub59=="biology  c"] <-6
d$alsubj4[d$edqsub59=="Biology - retake"] <-6
d$alsubj4[d$edqsub59=="boilogy"] <-6
d$alsubj4[d$edqsub59=="BOTTANY"] <-6
d$alsubj4[d$edqsub59=="practical biology"] <-6
d$alsubj4[d$edqsub59=="theoretical biology"] <-6
d$alsubj4[d$edqsub59=="biology s level"] <-7
d$alsubj4[d$edqsub59=="buisiness studies"] <-11
d$alsubj4[d$edqsub59=="BUISNESS STUDIES"] <-11
d$alsubj4[d$edqsub59=="BUISNESS STUDIES"] <-11
d$alsubj4[d$edqsub59=="buisness studies"] <-11
d$alsubj4[d$edqsub59=="BUISNESS STUDIES"] <-11
d$alsubj4[d$edqsub59=="business"] <-11
d$alsubj4[d$edqsub59=="Business Studies"] <-11
d$alsubj4[d$edqsub59=="BUSINESS STUDIES BIOLOGY"] <-11
d$alsubj4[d$edqsub59=="Business SudiesInform"] <-11
d$alsubj4[d$edqsub59=="CEMISTERY"] <-12
d$alsubj4[d$edqsub59=="CHE M"] <-12
d$alsubj4[d$edqsub59=="CHEM"] <-12
d$alsubj4[d$edqsub59=="Chem"] <-12
d$alsubj4[d$edqsub59=="chem"] <-12
d$alsubj4[d$edqsub59=="chemestry"] <-12
d$alsubj4[d$edqsub59=="CHEMISRTY"] <-12
d$alsubj4[d$edqsub59=="chemisrty"] <-12
d$alsubj4[d$edqsub59=="CHEMISTERY"] <-12
d$alsubj4[d$edqsub59=="chemistrry"] <-12
d$alsubj4[d$edqsub59=="Chemistry"] <-12
d$alsubj4[d$edqsub59=="CHEMISTRY"] <-12
d$alsubj4[d$edqsub59=="Chemistry - retake"] <-12
d$alsubj4[d$edqsub59=="chemistry (s)"] <-12
d$alsubj4[d$edqsub59=="CHEMISTRY A LEVEL"] <-12
d$alsubj4[d$edqsub59=="chemistyr"] <-12
d$alsubj4[d$edqsub59=="CHEMISTYR"] <-12
d$alsubj4[d$edqsub59=="CHEMSTRY"] <-12
d$alsubj4[d$edqsub59=="CHENISTRY"] <-12
d$alsubj4[d$edqsub59=="Chemistry S level"] <-13
d$alsubj4[d$edqsub59=="chemistry s level"] <-13
d$alsubj4[d$edqsub59=="Chemistry -S level"] <-13
d$alsubj4[d$edqsub59=="s' level chemestry"] <-13
d$alsubj4[d$edqsub59=="Special Chemistry"] <-13
d$alsubj4[d$edqsub59=="clasical civilisation"] <-14
d$alsubj4[d$edqsub59=="clasics"] <-14
d$alsubj4[d$edqsub59=="classical civilations"] <-14
d$alsubj4[d$edqsub59=="classical civilisation"] <-14
d$alsubj4[d$edqsub59=="CLASSICAL CIVILISATION"] <-14
d$alsubj4[d$edqsub59=="CLASSICAL CIVILISATIONS"] <-14
d$alsubj4[d$edqsub59=="CLASSICAL CIVILIZATION"] <-14
d$alsubj4[d$edqsub59=="CLASSICAL STUDIES"] <-14
d$alsubj4[d$edqsub59=="CLASSICS"] <-15
d$alsubj4[d$edqsub59=="COMMUNICATION STUDIES"] <-16
d$alsubj4[d$edqsub59=="communication studies"] <-16
d$alsubj4[d$edqsub59=="COMMUNICATIONS"] <-16
d$alsubj4[d$edqsub59=="COMMUNICATIONS STUDIES"] <-16
d$alsubj4[d$edqsub59=="Communications studies"] <-16
d$alsubj4[d$edqsub59=="applied computer science"] <-17
d$alsubj4[d$edqsub59=="comp studies"] <-17
d$alsubj4[d$edqsub59=="COMPTUTING SKILLS"] <-17
d$alsubj4[d$edqsub59=="COMPUTER PROGRAMMING"] <-17
d$alsubj4[d$edqsub59=="Computer Science"] <-17
d$alsubj4[d$edqsub59=="COMPUTER SCIENCE"] <-17
d$alsubj4[d$edqsub59=="computer science"] <-17
d$alsubj4[d$edqsub59=="computer sciences"] <-17
d$alsubj4[d$edqsub59=="Computer Sciencse"] <-17
d$alsubj4[d$edqsub59=="COMPUTER SICENCE"] <-17
d$alsubj4[d$edqsub59=="Computer Studies"] <-17
d$alsubj4[d$edqsub59=="Computer Studies"] <-17
d$alsubj4[d$edqsub59=="computer studies"] <-17
d$alsubj4[d$edqsub59=="Computer studies"] <-17
d$alsubj4[d$edqsub59=="computing"] <-17
d$alsubj4[d$edqsub59=="Computing"] <-17
d$alsubj4[d$edqsub59=="coputer science"] <-17
d$alsubj4[d$edqsub59=="information Technology"] <-17
d$alsubj4[d$edqsub59=="IT"] <-17
d$alsubj4[d$edqsub59=="Computer science S level"] <-18
d$alsubj4[d$edqsub59=="craft design and technolo"] <-19
d$alsubj4[d$edqsub59=="Design"] <-19
d$alsubj4[d$edqsub59=="design"] <-19
d$alsubj4[d$edqsub59=="DESIGN"] <-19
d$alsubj4[d$edqsub59=="dESIGN & tECHNOLGY"] <-19
d$alsubj4[d$edqsub59=="Design & Technology"] <-19
d$alsubj4[d$edqsub59=="design and technology"] <-19
d$alsubj4[d$edqsub59=="Design and Technology"] <-19
d$alsubj4[d$edqsub59=="design craft and technolo"] <-19
d$alsubj4[d$edqsub59=="design technology"] <-19
d$alsubj4[d$edqsub59=="DESIGN TECHNOLOGY"] <-19
d$alsubj4[d$edqsub59=="c.d.t"] <-19
d$alsubj4[d$edqsub59=="technology"] <-19
d$alsubj4[d$edqsub59=="Technology"] <-19
d$alsubj4[d$edqsub59=="DRAMA"] <-20
d$alsubj4[d$edqsub59=="Drama"] <-20
d$alsubj4[d$edqsub59=="drama and theatre arts"] <-20
d$alsubj4[d$edqsub59=="dance"] <-20
d$alsubj4[d$edqsub59=="Dance and Drama"] <-20
d$alsubj4[d$edqsub59=="ECCONOMICS"] <-21
d$alsubj4[d$edqsub59=="ecomics"] <-21
d$alsubj4[d$edqsub59=="ECOMICS"] <-21
d$alsubj4[d$edqsub59=="ecomincs"] <-21
d$alsubj4[d$edqsub59=="Ecomonics"] <-21
d$alsubj4[d$edqsub59=="ecomopmics"] <-21
d$alsubj4[d$edqsub59=="econ"] <-21
d$alsubj4[d$edqsub59=="ECON"] <-21
d$alsubj4[d$edqsub59=="ECONIICS"] <-21
d$alsubj4[d$edqsub59=="Econimics"] <-21
d$alsubj4[d$edqsub59=="econimics"] <-21
d$alsubj4[d$edqsub59=="Econimins"] <-21
d$alsubj4[d$edqsub59=="Econmics"] <-21
d$alsubj4[d$edqsub59=="econo;mics"] <-21
d$alsubj4[d$edqsub59=="ECONOMIC"] <-21
d$alsubj4[d$edqsub59=="Economic"] <-21
d$alsubj4[d$edqsub59=="economic and social histo"] <-21
d$alsubj4[d$edqsub59=="economices"] <-21
d$alsubj4[d$edqsub59=="economics"] <-21
d$alsubj4[d$edqsub59=="Economics"] <-21
d$alsubj4[d$edqsub59=="ECONOMICS"] <-21
d$alsubj4[d$edqsub59=="economics & politics"] <-21
d$alsubj4[d$edqsub59=="Economics & World Affairs"] <-21
d$alsubj4[d$edqsub59=="economics with politics"] <-21
d$alsubj4[d$edqsub59=="economicse"] <-21
d$alsubj4[d$edqsub59=="economis and world affair"] <-21
d$alsubj4[d$edqsub59=="Ecvonomics"] <-21
d$alsubj4[d$edqsub59=="encominics"] <-21
d$alsubj4[d$edqsub59=="ECONOMICS AT S LEVEL"] <-22
d$alsubj4[d$edqsub59=="Electronic Systems"] <-23
d$alsubj4[d$edqsub59=="ELECTRONIC\S#"] <-23
d$alsubj4[d$edqsub59=="eLECTRONICS"] <-23
d$alsubj4[d$edqsub59=="Electronics"] <-23
d$alsubj4[d$edqsub59=="electronics"] <-23
d$alsubj4[d$edqsub59=="ELECTRONICS"] <-23
d$alsubj4[d$edqsub59=="Electronics"] <-23
d$alsubj4[d$edqsub59=="electronics/statistics"] <-23
d$alsubj4[d$edqsub59=="microelectronics"] <-23
d$alsubj4[d$edqsub59=="ENGINEERING"] <-24
d$alsubj4[d$edqsub59=="ENGINEERING DRAWING"] <-24
d$alsubj4[d$edqsub59=="Engineering Drawing"] <-24
d$alsubj4[d$edqsub59=="Engineering drawing"] <-24
d$alsubj4[d$edqsub59=="engineering drawing"] <-24
d$alsubj4[d$edqsub59=="ENGINEERING DRAWING AND D"] <-24
d$alsubj4[d$edqsub59=="ENGINEERING METALWORK"] <-24
d$alsubj4[d$edqsub59=="ENGINEERING SCIENCE"] <-24
d$alsubj4[d$edqsub59=="Geometric and Engineering"] <-24
d$alsubj4[d$edqsub59=="combined english"] <-25
d$alsubj4[d$edqsub59=="ebglish"] <-25
d$alsubj4[d$edqsub59=="En g Lit"] <-25
d$alsubj4[d$edqsub59=="eng"] <-25
d$alsubj4[d$edqsub59=="ENG"] <-25
d$alsubj4[d$edqsub59=="ENG .LIT"] <-25
d$alsubj4[d$edqsub59=="eng lang"] <-25
d$alsubj4[d$edqsub59=="ENG LANG"] <-25
d$alsubj4[d$edqsub59=="Eng Lang"] <-25
d$alsubj4[d$edqsub59=="eng language/literature"] <-25
d$alsubj4[d$edqsub59=="ENG LIT"] <-25
d$alsubj4[d$edqsub59=="eng lit"] <-25
d$alsubj4[d$edqsub59=="Eng lit"] <-25
d$alsubj4[d$edqsub59=="eng lit."] <-25
d$alsubj4[d$edqsub59=="eng Slevel"] <-25
d$alsubj4[d$edqsub59=="Eng. Lit"] <-25
d$alsubj4[d$edqsub59=="ENG. LIT"] <-25
d$alsubj4[d$edqsub59=="Eng. Lit."] <-25
d$alsubj4[d$edqsub59=="ENG.LIT 1"] <-25
d$alsubj4[d$edqsub59=="eng.lit."] <-25
d$alsubj4[d$edqsub59=="eng/language."] <-25
d$alsubj4[d$edqsub59=="engl"] <-25
d$alsubj4[d$edqsub59=="English"] <-25
d$alsubj4[d$edqsub59=="ENGLISH"] <-25
d$alsubj4[d$edqsub59=="english"] <-25
d$alsubj4[d$edqsub59=="English  lit."] <-25
d$alsubj4[d$edqsub59=="English  lit."] <-25
d$alsubj4[d$edqsub59=="English (Literature)"] <-25
d$alsubj4[d$edqsub59=="ENGLISH ;LITERATURE"] <-25
d$alsubj4[d$edqsub59=="ENGLISH LANG"] <-25
d$alsubj4[d$edqsub59=="english lang"] <-25
d$alsubj4[d$edqsub59=="ENGLISH LANG & LIT"] <-25
d$alsubj4[d$edqsub59=="English Lang and Lit"] <-25
d$alsubj4[d$edqsub59=="English Lang."] <-25
d$alsubj4[d$edqsub59=="english lang.& lit."] <-25
d$alsubj4[d$edqsub59=="English lang/lit"] <-25
d$alsubj4[d$edqsub59=="ENGLISH LANG/LIT"] <-25
d$alsubj4[d$edqsub59=="english language"] <-25
d$alsubj4[d$edqsub59=="English Language"] <-25
d$alsubj4[d$edqsub59=="english language"] <-25
d$alsubj4[d$edqsub59=="ENGLISH LANGUAGE"] <-25
d$alsubj4[d$edqsub59=="English language"] <-25
d$alsubj4[d$edqsub59=="english Language"] <-25
d$alsubj4[d$edqsub59=="English language & Litera"] <-25
d$alsubj4[d$edqsub59=="english language & litera"] <-25
d$alsubj4[d$edqsub59=="ENGLISH LANGUAGE AND LIT"] <-25
d$alsubj4[d$edqsub59=="ENGLISH LANGUAGE AND LITE"] <-25
d$alsubj4[d$edqsub59=="english language/literatu"] <-25
d$alsubj4[d$edqsub59=="english lit"] <-25
d$alsubj4[d$edqsub59=="ENGLISH LIT"] <-25
d$alsubj4[d$edqsub59=="English Lit"] <-25
d$alsubj4[d$edqsub59=="english lit and lang"] <-25
d$alsubj4[d$edqsub59=="ENGLISH LIT AND LANGUAGE"] <-25
d$alsubj4[d$edqsub59=="english lit."] <-25
d$alsubj4[d$edqsub59=="English lit."] <-25
d$alsubj4[d$edqsub59=="ENGLISH LIT."] <-25
d$alsubj4[d$edqsub59=="English lit/lang"] <-25
d$alsubj4[d$edqsub59=="english litand language"] <-25
d$alsubj4[d$edqsub59=="english litature"] <-25
d$alsubj4[d$edqsub59=="ENGLISH LITERATURE"] <-25
d$alsubj4[d$edqsub59=="English Literature"] <-25
d$alsubj4[d$edqsub59=="english literature"] <-25
d$alsubj4[d$edqsub59=="English literature"] <-25
d$alsubj4[d$edqsub59=="English Literature & Lang"] <-25
d$alsubj4[d$edqsub59=="ENGLISH LITERATURE & LANG"] <-25
d$alsubj4[d$edqsub59=="English Literature/Lang."] <-25
d$alsubj4[d$edqsub59=="English Litereature"] <-25
d$alsubj4[d$edqsub59=="ENGLISH LITERTURA"] <-25
d$alsubj4[d$edqsub59=="English Litterature"] <-25
d$alsubj4[d$edqsub59=="english not specific"] <-25
d$alsubj4[d$edqsub59=="ENLISH"] <-25
d$alsubj4[d$edqsub59=="ENLISH LANGUAGE/LITERATUR"] <-25
d$alsubj4[d$edqsub59=="Environmental Sc"] <-62
d$alsubj4[d$edqsub59=="environmental science"] <-62
d$alsubj4[d$edqsub59=="Environmental Studies"] <-62
d$alsubj4[d$edqsub59=="Fashion"] <-52
d$alsubj4[d$edqsub59=="fashion"] <-52
d$alsubj4[d$edqsub59=="Fashion & textiles"] <-52
d$alsubj4[d$edqsub59=="fashion and design"] <-52
d$alsubj4[d$edqsub59=="fashion and fabric"] <-52
d$alsubj4[d$edqsub59=="Fashion design"] <-52
d$alsubj4[d$edqsub59=="film studies"]					<-26
d$alsubj4[d$edqsub59=="FILM STUDIES"] <-26
d$alsubj4[d$edqsub59=="freanch"] <-27
d$alsubj4[d$edqsub59=="frech"	] <-27
d$alsubj4[d$edqsub59=="FRENCH"] <-27
d$alsubj4[d$edqsub59=="french"] <-27
d$alsubj4[d$edqsub59=="French"] <-27
d$alsubj4[d$edqsub59=="french for business"] <-27
d$alsubj4[d$edqsub59=="french lang"]					<-27		
d$alsubj4[d$edqsub59=="French Literature"] <-27
d$alsubj4[d$edqsub59=="FRENCH1"] <-27
d$alsubj4[d$edqsub59=="French S level"] <-28
d$alsubj4[d$edqsub59=="Furhther Maths"] <-29
d$alsubj4[d$edqsub59=="further math"] <-29
d$alsubj4[d$edqsub59=="further mathematics"] <-29
d$alsubj4[d$edqsub59=="Further mathematics"] <-29
d$alsubj4[d$edqsub59=="FURTHER MATHEMATICS"] <-29
d$alsubj4[d$edqsub59=="Further Mathematics"] <-29
d$alsubj4[d$edqsub59=="further maths"] <-29
d$alsubj4[d$edqsub59=="Further Maths"] <-29
d$alsubj4[d$edqsub59=="Futher maths"] <-29
d$alsubj4[d$edqsub59=="FURTHER MATHS"] <-29
d$alsubj4[d$edqsub59=="FURTHER MATH"] <-29
d$alsubj4[d$edqsub59=="Further Maths - Pure and"] <-29
d$alsubj4[d$edqsub59=="FURTHER MATHS A LEVEL"] <-29
d$alsubj4[d$edqsub59=="FUTHER MATHS"] <-29
d$alsubj4[d$edqsub59=="further maths (s)"] <-30
d$alsubj4[d$edqsub59=="FURTHER MATHS S LEVEL"] <-30
d$alsubj4[d$edqsub59=="FURTHER MATHS STEP"] <-30
d$alsubj4[d$edqsub59=="S level further maths"] <-30
d$alsubj4[d$edqsub59=="GEN STUD"] <-31
d$alsubj4[d$edqsub59=="gen stud"] <-31
d$alsubj4[d$edqsub59=="gen studies"] <-31
d$alsubj4[d$edqsub59=="GEN STUDIES"] <-31
d$alsubj4[d$edqsub59=="Gen studies"] <-31
d$alsubj4[d$edqsub59=="Gen Studies"] <-31
d$alsubj4[d$edqsub59=="GEN STUDIES RELIGIOUS STU"] <-31
d$alsubj4[d$edqsub59=="gen. studies"] <-31
d$alsubj4[d$edqsub59=="gen.studies"] <-31
d$alsubj4[d$edqsub59=="general"] <-31
d$alsubj4[d$edqsub59=="GENERAL"] <-31
d$alsubj4[d$edqsub59=="general   studies"] <-31
d$alsubj4[d$edqsub59=="general  tudies"] <-31
d$alsubj4[d$edqsub59=="general knowl;edfge"] <-31
d$alsubj4[d$edqsub59=="GENERAL STIUDIES"] <-31
d$alsubj4[d$edqsub59=="GENERAL STUDIES"] <-31
d$alsubj4[d$edqsub59=="general studies"] <-31
d$alsubj4[d$edqsub59=="General studies"] <-31
d$alsubj4[d$edqsub59=="General Studies"] <-31
d$alsubj4[d$edqsub59=="GENERAL STUDY"] <-31
d$alsubj4[d$edqsub59=="general study"] <-31
d$alsubj4[d$edqsub59=="general studys"] <-31
d$alsubj4[d$edqsub59=="Genereal Studies"] <-31
d$alsubj4[d$edqsub59=="genstudies"] <-31
d$alsubj4[d$edqsub59=="1GEOGRAPHY"] <-32
d$alsubj4[d$edqsub59=="gegraphy"] <-32
d$alsubj4[d$edqsub59=="GEGRAPHY"] <-32
d$alsubj4[d$edqsub59=="geoagraphy"] <-32
d$alsubj4[d$edqsub59=="geog"] <-32
d$alsubj4[d$edqsub59=="Geog"] <-32
d$alsubj4[d$edqsub59=="GEOG"] <-32
d$alsubj4[d$edqsub59=="GEOGHRAY"] <-32
d$alsubj4[d$edqsub59=="geogr"] <-32
d$alsubj4[d$edqsub59=="GEOGRAGHY"] <-32
d$alsubj4[d$edqsub59=="GEOGRAHY"] <-32
d$alsubj4[d$edqsub59=="geographt"] <-32
d$alsubj4[d$edqsub59=="GEOGRAPHY"] <-32
d$alsubj4[d$edqsub59=="Geography"] <-32
d$alsubj4[d$edqsub59=="geography"] <-32
d$alsubj4[d$edqsub59=="geography grade d"] <-32
d$alsubj4[d$edqsub59=="geographyy"] <-32
d$alsubj4[d$edqsub59=="geograqphy"] <-32
d$alsubj4[d$edqsub59=="geophraphy"] <-32
d$alsubj4[d$edqsub59=="gepgraphy"] <-32
d$alsubj4[d$edqsub59=="GOEG"] <-32
d$alsubj4[d$edqsub59=="goegraphy"] <-32
d$alsubj4[d$edqsub59=="goegraphy"] <-32
d$alsubj4[d$edqsub59=="geog   s level"] <-33
d$alsubj4[d$edqsub59=="geog s level"] <-33
d$alsubj4[d$edqsub59=="GEOGRAPHY S LEVEL"] <-33
d$alsubj4[d$edqsub59=="geography s level"] <-33
d$alsubj4[d$edqsub59=="geology"] <-34
d$alsubj4[d$edqsub59=="Geology"] <-34
d$alsubj4[d$edqsub59=="GEOLOGY"] <-34
d$alsubj4[d$edqsub59=="German"] <-35
d$alsubj4[d$edqsub59=="german"] <-35
d$alsubj4[d$edqsub59=="GERMAN"] <-35
d$alsubj4[d$edqsub59=="German S level"] <-35
d$alsubj4[d$edqsub59=="German."] <-35
d$alsubj4[d$edqsub59=="gevernment politics"] <-36
d$alsubj4[d$edqsub59=="govenment and politics"] <-36
d$alsubj4[d$edqsub59=="GOVERNMENT"] <-36
d$alsubj4[d$edqsub59=="Government & politics"] <-36
d$alsubj4[d$edqsub59=="GOVERNMENT & POLITICS"] <-36
d$alsubj4[d$edqsub59=="GOVERNMENT & POLITICS"] <-36
d$alsubj4[d$edqsub59=="GOVERNMENT AND POLITICAL"] <-36
d$alsubj4[d$edqsub59=="GOVERNMENT AND POLITICS"] <-36
d$alsubj4[d$edqsub59=="government and politics"] <-36
d$alsubj4[d$edqsub59=="Government and Politics"] <-36
d$alsubj4[d$edqsub59=="GOVERNMENT POLITICS"] <-36
d$alsubj4[d$edqsub59=="governmental politics"] <-36
d$alsubj4[d$edqsub59=="Govrnment and politics"] <-36
d$alsubj4[d$edqsub59=="Govt and politics"] <-36
d$alsubj4[d$edqsub59=="GOVT AND POLITICS"] <-36
d$alsubj4[d$edqsub59=="GOVT. AND POLITICS"] <-36
d$alsubj4[d$edqsub59=="govt/politics"] <-36
d$alsubj4[d$edqsub59=="GRAPHIC \DESIGN"] <-37
d$alsubj4[d$edqsub59=="GRAPHIC DESIGN"] <-37
d$alsubj4[d$edqsub59=="Graphic Design"] <-37
d$alsubj4[d$edqsub59=="graphic design"] <-37
d$alsubj4[d$edqsub59=="graphical communication"] <-37
d$alsubj4[d$edqsub59=="Graphical communication"] <-37
d$alsubj4[d$edqsub59=="gre ke"] <-38
d$alsubj4[d$edqsub59=="GREEK"] <-38
d$alsubj4[d$edqsub59=="greek"] <-38
d$alsubj4[d$edqsub59== "MODERN GREEK"] <-38
d$alsubj4[d$edqsub59==";history"] <-39
d$alsubj4[d$edqsub59=="19 centuary british and e"] <-39
d$alsubj4[d$edqsub59=="American History"] <-39
d$alsubj4[d$edqsub59=="HIDTORY"] <-39
d$alsubj4[d$edqsub59=="hist"] <-39
d$alsubj4[d$edqsub59=="History"] <-39
d$alsubj4[d$edqsub59=="HISTORY"] <-39
d$alsubj4[d$edqsub59=="history"] <-39
d$alsubj4[d$edqsub59=="History (modern)"] <-39
d$alsubj4[d$edqsub59=="History."] <-39
d$alsubj4[d$edqsub59=="Histoy"] <-39
d$alsubj4[d$edqsub59=="histroy"] <-39
d$alsubj4[d$edqsub59=="medeaevil history"] <-39
d$alsubj4[d$edqsub59=="MEDIEVAL HISTORY"] <-39
d$alsubj4[d$edqsub59=="MODERN HISTORY"] <-39
d$alsubj4[d$edqsub59=="Social & Economic History"] <-39
d$alsubj4[d$edqsub59=="Social and economic histo"] <-39
d$alsubj4[d$edqsub59=="HISTORY S LEVEL"] <-40
d$alsubj4[d$edqsub59=="history S level"] <-40
d$alsubj4[d$edqsub59=="hum,an bilogy"] <-62
d$alsubj4[d$edqsub59=="human  biology"] <-62
d$alsubj4[d$edqsub59=="human biology"] <-62
d$alsubj4[d$edqsub59=="Human biology"] <-62
d$alsubj4[d$edqsub59=="Human Biology"] <-62
d$alsubj4[d$edqsub59=="human physiology"] <-62
d$alsubj4[d$edqsub59=="HUMAN BIOLOGY"] <-62
d$alsubj4[d$edqsub59=="HUMAN PHYSIOLOGY"] <-62
d$alsubj4[d$edqsub59=="humanbiology"] <-62
d$alsubj4[d$edqsub59=="humanphysiology"] <-62
d$alsubj4[d$edqsub59=="industrila studies"] <-41
d$alsubj4[d$edqsub59=="Industrial Studies"] <-41
d$alsubj4[d$edqsub59=="Italian"] <-42
d$alsubj4[d$edqsub59=="LATIN"] <-43
d$alsubj4[d$edqsub59=="latin"] <-43
d$alsubj4[d$edqsub59=="Latin"] <-43
d$alsubj4[d$edqsub59=="Latin S level"] <-44
d$alsubj4[d$edqsub59=="latin s level"] <-44
d$alsubj4[d$edqsub59=="LATIN SPECIAL"] <-44
d$alsubj4[d$edqsub59=="English Law."] <-45
d$alsubj4[d$edqsub59=="criminal law"] <-45
d$alsubj4[d$edqsub59=="Law"] <-45
d$alsubj4[d$edqsub59=="law"] <-45
d$alsubj4[d$edqsub59=="LAW"] <-45
d$alsubj4[d$edqsub59=="low"] <-45
d$alsubj4[d$edqsub59=="applied and pure maths"] <-46
d$alsubj4[d$edqsub59=="Applied Mathematics"] <-46
d$alsubj4[d$edqsub59=="applied mathematics"] <-46
d$alsubj4[d$edqsub59=="APPLIED MATHS"] <-46
d$alsubj4[d$edqsub59=="applied maths"] <-46
d$alsubj4[d$edqsub59=="Applied Maths"] <-46
d$alsubj4[d$edqsub59=="combined maths"] <-46
d$alsubj4[d$edqsub59=="Maaths"] <-46
d$alsubj4[d$edqsub59=="Matematics"] <-46
d$alsubj4[d$edqsub59=="MATH"] <-46
d$alsubj4[d$edqsub59=="math"] <-46
d$alsubj4[d$edqsub59=="Math & General knowladge"] <-46
d$alsubj4[d$edqsub59=="Mathematics"] <-46
d$alsubj4[d$edqsub59=="mATHEMATICS"] <-46
d$alsubj4[d$edqsub59=="MATHEMATICS"] <-46
d$alsubj4[d$edqsub59=="mathematics"] <-46
d$alsubj4[d$edqsub59=="MATHEMATICS - PURE/APLIED"] <-46
d$alsubj4[d$edqsub59=="mathematics and art"] <-46
d$alsubj4[d$edqsub59=="Mathematics and Statistic"] <-46
d$alsubj4[d$edqsub59=="Mathematics with stats"] <-46
d$alsubj4[d$edqsub59=="mathematics, pure and app"] <-46
d$alsubj4[d$edqsub59=="MATHMATICS AND STATISTICS"] <-46
d$alsubj4[d$edqsub59=="Maths"] <-46
d$alsubj4[d$edqsub59=="maths"] <-46
d$alsubj4[d$edqsub59=="MATHS"] <-46
d$alsubj4[d$edqsub59=="maths & mechanics"] <-46
d$alsubj4[d$edqsub59=="Maths & Statistics"] <-46
d$alsubj4[d$edqsub59=="maths & statistics"] <-46
d$alsubj4[d$edqsub59=="Maths (pure and Applied)"] <-46
d$alsubj4[d$edqsub59=="Maths /pure and applied"] <-46
d$alsubj4[d$edqsub59=="maths + stats"] <-46
d$alsubj4[d$edqsub59=="MATHS A LEVEL"] <-46
d$alsubj4[d$edqsub59=="maths an"] <-46
d$alsubj4[d$edqsub59=="MATHS AND STATISTICS"] <-46
d$alsubj4[d$edqsub59=="maths and statistics"] <-46
d$alsubj4[d$edqsub59=="Maths and stats"] <-46
d$alsubj4[d$edqsub59=="MATHS AND STATS"] <-46
d$alsubj4[d$edqsub59=="maths AS"] <-46
d$alsubj4[d$edqsub59=="maths pure"] <-46
d$alsubj4[d$edqsub59=="maths pure and applied"] <-46
d$alsubj4[d$edqsub59=="MATHS- PURE AND APPLIED"] <-46
d$alsubj4[d$edqsub59=="Maths pure l& applied"] <-46
d$alsubj4[d$edqsub59=="MATHS S LEVEL"] <-46
d$alsubj4[d$edqsub59=="MATHS WITH STATISTICS"] <-46
d$alsubj4[d$edqsub59=="maths with statistics"] <-46
d$alsubj4[d$edqsub59=="maths with stats"] <-46
d$alsubj4[d$edqsub59=="Maths with stats."] <-46
d$alsubj4[d$edqsub59=="MATHS, PURE AND APPLIED"] <-46
d$alsubj4[d$edqsub59=="maths."] <-46
d$alsubj4[d$edqsub59=="MATHS."] <-46
d$alsubj4[d$edqsub59=="Maths."] <-46
d$alsubj4[d$edqsub59=="Maths/pure and applied"] <-46
d$alsubj4[d$edqsub59=="Maths/Statistics"] <-46
d$alsubj4[d$edqsub59=="MATHSW"] <-46
d$alsubj4[d$edqsub59=="Mathsw"] <-46
d$alsubj4[d$edqsub59=="mechanics"] <-46
d$alsubj4[d$edqsub59=="MMaths"] <-46
d$alsubj4[d$edqsub59=="PURE & APPL MATHS"] <-46
d$alsubj4[d$edqsub59=="Pure & Applied Maths"] <-46
d$alsubj4[d$edqsub59=="pure and applied maths"] <-46
d$alsubj4[d$edqsub59=="PURE AND APPLIED MATHS"] <-46
d$alsubj4[d$edqsub59=="Pure M aths & Statistics"] <-46
d$alsubj4[d$edqsub59=="pure mathematics"] <-46
d$alsubj4[d$edqsub59=="PURE MATHEMATICS"] <-46
d$alsubj4[d$edqsub59=="pure mathematics"] <-46
d$alsubj4[d$edqsub59=="pure maths"] <-46
d$alsubj4[d$edqsub59=="PURE MATHS"] <-46
d$alsubj4[d$edqsub59=="Pure maths"] <-46
d$alsubj4[d$edqsub59=="Pure Maths"] <-46
d$alsubj4[d$edqsub59=="Pure Maths & Mechanics"] <-46
d$alsubj4[d$edqsub59=="Pure Maths & Statistics"] <-46
d$alsubj4[d$edqsub59=="Pure Maths & Stats"] <-46
d$alsubj4[d$edqsub59=="pure maths and statistics"] <-46
d$alsubj4[d$edqsub59=="PURE MATHS AND STATISTICS"] <-46
d$alsubj4[d$edqsub59=="PURE MATHS AND STATS"] <-46
d$alsubj4[d$edqsub59=="pure maths and stats"] <-46
d$alsubj4[d$edqsub59=="PURE MATHS WITH STATISTIC"] <-46
d$alsubj4[d$edqsub59=="pure maths with statistic"] <-46
d$alsubj4[d$edqsub59=="Pure maths with stats"] <-46
d$alsubj4[d$edqsub59=="PURE MATHS WITH STATS"] <-46
d$alsubj4[d$edqsub59=="pure maths with stats."] <-46
d$alsubj4[d$edqsub59=="pure maths witih stats."] <-46
d$alsubj4[d$edqsub59=="pure maths/statistics"] <-46
d$alsubj4[d$edqsub59=="pure/statistal maths"] <-46
d$alsubj4[d$edqsub59=="stastics"] <-46
d$alsubj4[d$edqsub59=="statisics"] <-46
d$alsubj4[d$edqsub59=="STATISTICS"] <-46
d$alsubj4[d$edqsub59=="statistics"] <-46
d$alsubj4[d$edqsub59=="Statistics"] <-46
d$alsubj4[d$edqsub59=="stats"] <-46
d$alsubj4[d$edqsub59=="STATS"] <-46
d$alsubj4[d$edqsub59=="Applied Maths S level"] <-47
d$alsubj4[d$edqsub59=="Maths S/level"] <-46
d$alsubj4[d$edqsub59=="S level maths"] <-46
d$alsubj4[d$edqsub59=="s' level maths"] <-46
d$alsubj4[d$edqsub59=="Step maths"] <-46
d$alsubj4[d$edqsub59=="MEDIA"] <-48
d$alsubj4[d$edqsub59=="Media studies"] <-48
d$alsubj4[d$edqsub59=="music"] <-49
d$alsubj4[d$edqsub59=="Music"] <-49
d$alsubj4[d$edqsub59=="MUSIC"] <-49
d$alsubj4[d$edqsub59=="music practical"] <-49
d$alsubj4[d$edqsub59=="music theory"] <-49
d$alsubj4[d$edqsub59=="Practical music"] <-49
d$alsubj4[d$edqsub59=="Rudiments of Music"] <-49
d$alsubj4[d$edqsub59=="STAGE DECOR AND COSTUME D"] <-50
d$alsubj4[d$edqsub59=="FINANCIAL CONTROL"] <-50
d$alsubj4[d$edqsub59=="ceramics"] <-51
d$alsubj4[d$edqsub59=="CRAFT"] <-51
d$alsubj4[d$edqsub59=="CRAFT DESIGN & THEATRE ST"] <-51
d$alsubj4[d$edqsub59=="POTTERY"] <-51
d$alsubj4[d$edqsub59=="printing"] <-52
d$alsubj4[d$edqsub59=="TEXTILE AND DRESS"] <-52
d$alsubj4[d$edqsub59=="DRESS"] <-52
d$alsubj4[d$edqsub59=="dress and design"] <-52
d$alsubj4[d$edqsub59=="FOOD AND NUTRITION"] <-52
d$alsubj4[d$edqsub59=="food and nutrition"] <-52
d$alsubj4[d$edqsub59=="home econimics"] <-52
d$alsubj4[d$edqsub59=="home economic"] <-52
d$alsubj4[d$edqsub59=="HOME ECONOMICS"] <-52
d$alsubj4[d$edqsub59=="Home Economics"] <-52
d$alsubj4[d$edqsub59=="home economics"] <-52
d$alsubj4[d$edqsub59=="home economics - sewing"] <-52
d$alsubj4[d$edqsub59=="Home economics."] <-52
d$alsubj4[d$edqsub59=="HOME, FAMILY AND SOCIETY"] <-52
d$alsubj4[d$edqsub59=="HOME, FAMILY AND SOCIETY"] <-52
d$alsubj4[d$edqsub59=="CONFECTIONERY TECHNOLOGY"] <-52
d$alsubj4[d$edqsub59=="cookery"] <-52
d$alsubj4[d$edqsub59=="COOKERY"] <-52
d$alsubj4[d$edqsub59=="Domestic Science"] <-52
d$alsubj4[d$edqsub59=="surveying"] <-52
d$alsubj4[d$edqsub59=="tech drawing"] <-52
d$alsubj4[d$edqsub59=="TECH DRAWING"] <-52
d$alsubj4[d$edqsub59=="tech drawing"] <-52
d$alsubj4[d$edqsub59=="TECHNICAL DRAWING"] <-52
d$alsubj4[d$edqsub59=="technical drawing"] <-52
d$alsubj4[d$edqsub59=="Technical DRawing"] <-52
d$alsubj4[d$edqsub59=="technical drawing"] <-52
d$alsubj4[d$edqsub59=="Technical Drawing"] <-52
d$alsubj4[d$edqsub59=="BUILDING CONSTRUCTION"] <-52
d$alsubj4[d$edqsub59=="building construction"] <-52
d$alsubj4[d$edqsub59=="Needlework"] <-52
d$alsubj4[d$edqsub59== "stage craft and design"] <-52
d$alsubj4[d$edqsub59=="SECIENE"] <-62
d$alsubj4[d$edqsub59=="Health Scencie"] <-62
d$alsubj4[d$edqsub59=="HEALTH STUDIES"] <-62
d$alsubj4[d$edqsub59=="Science in Society"] <-62
d$alsubj4[d$edqsub59=="philosophy"] <-54
d$alsubj4[d$edqsub59=="Philosophy"] <-54
d$alsubj4[d$edqsub59=="PHILOSOPHY"] <-54
d$alsubj4[d$edqsub59=="philosphy"] <-54
d$alsubj4[d$edqsub59=="phisics"] <-56
d$alsubj4[d$edqsub59=="PHOTOGRAPHY"] <-55
d$alsubj4[d$edqsub59=="photography"] <-55
d$alsubj4[d$edqsub59=="physical education"] <-68
d$alsubj4[d$edqsub59=="PHYSICAL EDUCATION"] <-68
d$alsubj4[d$edqsub59=="HPYSICS"] <-56
d$alsubj4[d$edqsub59=="PHSICS"] <-56
d$alsubj4[d$edqsub59=="phsics"] <-56
d$alsubj4[d$edqsub59=="phsyics"] <-56
d$alsubj4[d$edqsub59=="phycics"] <-56
d$alsubj4[d$edqsub59=="PHYS"] <-56
d$alsubj4[d$edqsub59=="phys/  maths"] <-56
d$alsubj4[d$edqsub59=="PHYSIC"] <-56
d$alsubj4[d$edqsub59=="PHYSICA"] <-56
d$alsubj4[d$edqsub59=="Physiccs"] <-56
d$alsubj4[d$edqsub59=="Physics"] <-56
d$alsubj4[d$edqsub59=="PHYSICS"] <-56
d$alsubj4[d$edqsub59=="physics"] <-56
d$alsubj4[d$edqsub59=="PHYSICS A LEVEL"] <-56
d$alsubj4[d$edqsub59=="PHYSICS WITH ELECTRONICS"] <-56
d$alsubj4[d$edqsub59=="Physics."] <-56
d$alsubj4[d$edqsub59=="PHYSYCS"] <-56
d$alsubj4[d$edqsub59=="pyschics"] <-56
d$alsubj4[d$edqsub59=="PYSICS"] <-56
d$alsubj4[d$edqsub59=="PHICS"] <-56
d$alsubj4[d$edqsub59=="physics (s)"] <-57
d$alsubj4[d$edqsub59=="Physics S/level"] <-57
d$alsubj4[d$edqsub59=="PHYSICS STEP"] <-57
d$alsubj4[d$edqsub59=="British and American Poli"] <-36
d$alsubj4[d$edqsub59=="BRITISH GOV AND POLITICS"] <-36
d$alsubj4[d$edqsub59=="BRITISH GOVERN AND POLITI"] <-36
d$alsubj4[d$edqsub59=="British government"] <-36
d$alsubj4[d$edqsub59=="british government and po"] <-36
d$alsubj4[d$edqsub59=="British Government l& Pol"] <-36
d$alsubj4[d$edqsub59=="British Govt and politics"] <-36
d$alsubj4[d$edqsub59=="polatics and government"] <-36
d$alsubj4[d$edqsub59=="POLICTICAL HISTORY"] <-36
d$alsubj4[d$edqsub59=="POLITICAL AND ECONOMIC ST"] <-36
d$alsubj4[d$edqsub59=="Political History"] <-36
d$alsubj4[d$edqsub59=="political History"] <-36
d$alsubj4[d$edqsub59=="political history"] <-36
d$alsubj4[d$edqsub59=="political science"] <-36
d$alsubj4[d$edqsub59=="Political Studies"] <-36
d$alsubj4[d$edqsub59=="political studiesd"] <-36
d$alsubj4[d$edqsub59=="politics"] <-36
d$alsubj4[d$edqsub59=="POLITICS"] <-36
d$alsubj4[d$edqsub59=="Politics"] <-36
d$alsubj4[d$edqsub59=="politics & economics"] <-36
d$alsubj4[d$edqsub59=="politics & government"] <-36
d$alsubj4[d$edqsub59=="politics and government"] <-36
d$alsubj4[d$edqsub59=="Politics."] <-36
d$alsubj4[d$edqsub59=="Phsychology"] <-59
d$alsubj4[d$edqsub59=="phsycology"] <-59
d$alsubj4[d$edqsub59=="phychology"] <-59
d$alsubj4[d$edqsub59=="PHYCOLOGY"] <-59
d$alsubj4[d$edqsub59=="phycology"] <-59
d$alsubj4[d$edqsub59=="physchology"] <-59
d$alsubj4[d$edqsub59=="Physchology"] <-59
d$alsubj4[d$edqsub59=="physclogy"] <-59
d$alsubj4[d$edqsub59=="Physco;ogy"] <-59
d$alsubj4[d$edqsub59=="PHYSCOLOGY"] <-59
d$alsubj4[d$edqsub59=="physology"] <-59
d$alsubj4[d$edqsub59=="pschology"] <-59
d$alsubj4[d$edqsub59=="pschology"] <-59
d$alsubj4[d$edqsub59=="pshycoclgy"] <-59
d$alsubj4[d$edqsub59=="PSYCHOLOGY"] <-59
d$alsubj4[d$edqsub59=="psychology"] <-59
d$alsubj4[d$edqsub59=="Psychology"] <-59
d$alsubj4[d$edqsub59=="Psycology"] <-59
d$alsubj4[d$edqsub59=="PSYCOLOGY"] <-59
d$alsubj4[d$edqsub59=="public affairs"] <-36
d$alsubj4[d$edqsub59=="PYSCOLOGY"] <-59
d$alsubj4[d$edqsub59=="Divinity"] <-60
d$alsubj4[d$edqsub59=="DIVINITY"] <-60
d$alsubj4[d$edqsub59=="r.e"] <-60
d$alsubj4[d$edqsub59=="R.E."] <-60
d$alsubj4[d$edqsub59=="R.e."] <-60
d$alsubj4[d$edqsub59=="RE"] <-60
d$alsubj4[d$edqsub59=="re"] <-60
d$alsubj4[d$edqsub59=="REL. STUDIES"] <-60
d$alsubj4[d$edqsub59=="relegious studies"] <-60
d$alsubj4[d$edqsub59=="philosi"] <-54
d$alsubj4[d$edqsub59=="RELIG STUDIES"] <-60
d$alsubj4[d$edqsub59=="religeous studies"] <-60
d$alsubj4[d$edqsub59=="religious education"] <-60
d$alsubj4[d$edqsub59=="Religious Education"] <-60
d$alsubj4[d$edqsub59=="RELIGIOUS EDUCATION"] <-60
d$alsubj4[d$edqsub59=="religious education"] <-60
d$alsubj4[d$edqsub59=="religious knowledge"] <-60
d$alsubj4[d$edqsub59=="religious studies"] <-60
d$alsubj4[d$edqsub59=="RELIGIOUS STUDIES"] <-60
d$alsubj4[d$edqsub59=="Religious studies"] <-60
d$alsubj4[d$edqsub59=="religous"] <-60
d$alsubj4[d$edqsub59=="Religous Education"] <-60
d$alsubj4[d$edqsub59=="scriptire"] <-60
d$alsubj4[d$edqsub59=="theology"] <-60
d$alsubj4[d$edqsub59=="russian"] <-61
d$alsubj4[d$edqsub59=="secretarial"] <-63
d$alsubj4[d$edqsub59=="SECRETARIAL"] <-63
d$alsubj4[d$edqsub59=="SECRETARIAL STUDIES"] <-63
d$alsubj4[d$edqsub59=="Secretarial studies"] <-63
d$alsubj4[d$edqsub59=="SOCIAL BIOLOGY"] <-62
d$alsubj4[d$edqsub59=="social biology"] <-62
d$alsubj4[d$edqsub59=="Social biology"] <-62
d$alsubj4[d$edqsub59=="Social Biology"] <-62
d$alsubj4[d$edqsub59=="SOCIAL POLICY ADMIN"] <-64
d$alsubj4[d$edqsub59=="SOCIAL POLICY"] <-64
d$alsubj4[d$edqsub59=="Social sciences"] <-65
d$alsubj4[d$edqsub59=="social studies"] <-65
d$alsubj4[d$edqsub59=="health and social care"] <-65
d$alsubj4[d$edqsub59=="SOCIALGY"] <-66
d$alsubj4[d$edqsub59=="socialogy"] <-66
d$alsubj4[d$edqsub59=="SOCIALOGY"] <-66
d$alsubj4[d$edqsub59=="Socialolgy"] <-66
d$alsubj4[d$edqsub59=="socialologu"] <-66
d$alsubj4[d$edqsub59=="Socialology"] <-66
d$alsubj4[d$edqsub59=="SOCIOLGY"] <-66
d$alsubj4[d$edqsub59=="socioligy"] <-66
d$alsubj4[d$edqsub59=="sociolocy"] <-66
d$alsubj4[d$edqsub59=="SOCIOLOGOY"] <-66
d$alsubj4[d$edqsub59=="SOCIOLOGY"] <-66
d$alsubj4[d$edqsub59=="Sociology"] <-66
d$alsubj4[d$edqsub59=="sociology"] <-66
d$alsubj4[d$edqsub59=="SOCIOPLOGY"] <-66
d$alsubj4[d$edqsub59=="spanish"] <-67
d$alsubj4[d$edqsub59=="Spanish"] <-67
d$alsubj4[d$edqsub59=="SPANISH"] <-67
d$alsubj4[d$edqsub59=="spannish"] <-67
d$alsubj4[d$edqsub59=="sports studies"] <-68
d$alsubj4[d$edqsub59=="SPORTS STUDIES"] <-68
d$alsubj4[d$edqsub59=="Sports Studies"] <-68
d$alsubj4[d$edqsub59=="theater studies"] <-69
d$alsubj4[d$edqsub59=="Theatre Arts"] <-69
d$alsubj4[d$edqsub59=="THEATRE STUDIEAS"] <-69
d$alsubj4[d$edqsub59=="theatre studies"] <-69
d$alsubj4[d$edqsub59=="Theatre studies"] <-69
d$alsubj4[d$edqsub59=="Theatre Studies"] <-69
d$alsubj4[d$edqsub59=="THEATRE STUDIES"] <-69
d$alsubj4[d$edqsub59=="theatre studys"] <-69
d$alsubj4[d$edqsub59=="theatre stuides"] <-69
d$alsubj4[d$edqsub59=="Urban Studies"] <-51
d$alsubj4[d$edqsub59=="Urdu"] <-70
d$alsubj4[d$edqsub59=="welsh"] <-71
d$alsubj4[d$edqsub59=="WELSH"] <-71
d$alsubj4[d$edqsub59=="war and society"] <-51
d$alsubj4[d$edqsub59=="ZOOLOGY"] <-62
d$alsubj4[d$edqsub59=="zoology"] <-62
d$alsubj4[d$edqsub59=="MANAGEMENT"] <-51
d$alsubj4[d$edqsub59=="modern studies"] <-51
d$alsubj4[d$edqsub59=="MODERN STUDIES"] <-51

# A-level subject 5
d$alsubj5<-NA
d$alsubj5[d$edqsub60=="ACCOUNT AND BUSINESS"] <-1
d$alsubj5[d$edqsub60=="ACCOUNTANCY"] <-1
d$alsubj5[d$edqsub60=="accountancy"] <-1
d$alsubj5[d$edqsub60=="Accountancy"] <-1
d$alsubj5[d$edqsub60=="accountancy"] <-1
d$alsubj5[d$edqsub60=="Accounting"] <-1
d$alsubj5[d$edqsub60=="Accounts"] <-1
d$alsubj5[d$edqsub60=="accounts"] <-1
d$alsubj5[d$edqsub60=="ACCOUNTS"] <-1
d$alsubj5[d$edqsub60=="accounts(business studies"] <-1
d$alsubj5[d$edqsub60=="acounts"] <-1
d$alsubj5[d$edqsub60=="ancient greek"] 		<-2
d$alsubj5[d$edqsub60=="ancient history"] <-3
d$alsubj5[d$edqsub60=="ANCIENT HISTORY"] <-3
d$alsubj5[d$edqsub60=="Ancient History"] <-3
d$alsubj5[d$edqsub60=="ANCIENT HISTORYU"] <-3
d$alsubj5[d$edqsub60=="archaeology"] <-4
d$alsubj5[d$edqsub60=="Archaeology"] <-4
d$alsubj5[d$edqsub60=="2 dimensional art"] <-5
d$alsubj5[d$edqsub60=="art"] <-5
d$alsubj5[d$edqsub60=="3 dimensional art"] <-5
d$alsubj5[d$edqsub60=="Art"] <-5
d$alsubj5[d$edqsub60=="ART"] <-5
d$alsubj5[d$edqsub60=="ARTS"] <-5
d$alsubj5[d$edqsub60=="fine art"] <-5
d$alsubj5[d$edqsub60=="FINE ART"] <-5
d$alsubj5[d$edqsub60=="STUDY OF ART"] <-5
d$alsubj5[d$edqsub60=="Art & Craft"] <-5
d$alsubj5[d$edqsub60=="Art & Design"] <-5
d$alsubj5[d$edqsub60=="art & design technology"] <-5
d$alsubj5[d$edqsub60=="ART 7 DESIGN"] <-5
d$alsubj5[d$edqsub60=="ART AND ART HISTORY"] <-5
d$alsubj5[d$edqsub60=="Art and Art History"] <-5
d$alsubj5[d$edqsub60=="art and crafts"] <-5
d$alsubj5[d$edqsub60=="Art and design"] <-5
d$alsubj5[d$edqsub60=="ART AND DESIGN"] <-5
d$alsubj5[d$edqsub60=="art/design"] <-5
d$alsubj5[d$edqsub60=="art history"] <-5
d$alsubj5[d$edqsub60=="Art History"] <-5
d$alsubj5[d$edqsub60=="art with art history"] <-5
d$alsubj5[d$edqsub60=="ART WITH ART HISTORY"] <-5
d$alsubj5[d$edqsub60=="art/art history"] <-5
d$alsubj5[d$edqsub60=="Art/Art History"] <-5
d$alsubj5[d$edqsub60=="history of aft"] <-5
d$alsubj5[d$edqsub60=="History of art"] <-5
d$alsubj5[d$edqsub60=="History of Art"] <-5
d$alsubj5[d$edqsub60=="bilogy"] <-6
d$alsubj5[d$edqsub60=="biol"] <-6
d$alsubj5[d$edqsub60=="biol;gy"] <-6
d$alsubj5[d$edqsub60=="Biology"] <-6
d$alsubj5[d$edqsub60=="biology"] <-6
d$alsubj5[d$edqsub60=="BIOLOGY"] <-6
d$alsubj5[d$edqsub60=="biology  c"] <-6
d$alsubj5[d$edqsub60=="Biology - retake"] <-6
d$alsubj5[d$edqsub60=="boilogy"] <-6
d$alsubj5[d$edqsub60=="BOTTANY"] <-6
d$alsubj5[d$edqsub60=="practical biology"] <-6
d$alsubj5[d$edqsub60=="theoretical biology"] <-6
d$alsubj5[d$edqsub60=="biology s level"] <-7
d$alsubj5[d$edqsub60=="buisiness studies"] <-11
d$alsubj5[d$edqsub60=="BUISNESS STUDIES"] <-11
d$alsubj5[d$edqsub60=="BUISNESS STUDIES"] <-11
d$alsubj5[d$edqsub60=="buisness studies"] <-11
d$alsubj5[d$edqsub60=="BUISNESS STUDIES"] <-11
d$alsubj5[d$edqsub60=="business"] <-11
d$alsubj5[d$edqsub60=="Business Studies"] <-11
d$alsubj5[d$edqsub60=="BUSINESS STUDIES BIOLOGY"] <-11
d$alsubj5[d$edqsub60=="Business SudiesInform"] <-11
d$alsubj5[d$edqsub60=="CEMISTERY"] <-12
d$alsubj5[d$edqsub60=="CHE M"] <-12
d$alsubj5[d$edqsub60=="CHEM"] <-12
d$alsubj5[d$edqsub60=="Chem"] <-12
d$alsubj5[d$edqsub60=="chem"] <-12
d$alsubj5[d$edqsub60=="chemestry"] <-12
d$alsubj5[d$edqsub60=="CHEMISRTY"] <-12
d$alsubj5[d$edqsub60=="chemisrty"] <-12
d$alsubj5[d$edqsub60=="CHEMISTERY"] <-12
d$alsubj5[d$edqsub60=="chemistrry"] <-12
d$alsubj5[d$edqsub60=="Chemistry"] <-12
d$alsubj5[d$edqsub60=="CHEMISTRY"] <-12
d$alsubj5[d$edqsub60=="Chemistry - retake"] <-12
d$alsubj5[d$edqsub60=="chemistry (s)"] <-12
d$alsubj5[d$edqsub60=="CHEMISTRY A LEVEL"] <-12
d$alsubj5[d$edqsub60=="chemistyr"] <-12
d$alsubj5[d$edqsub60=="CHEMISTYR"] <-12
d$alsubj5[d$edqsub60=="CHEMSTRY"] <-12
d$alsubj5[d$edqsub60=="CHENISTRY"] <-12
d$alsubj5[d$edqsub60=="Chemistry S level"] <-13
d$alsubj5[d$edqsub60=="chemistry s level"] <-13
d$alsubj5[d$edqsub60=="Chemistry -S level"] <-13
d$alsubj5[d$edqsub60=="s' level chemestry"] <-13
d$alsubj5[d$edqsub60=="Special Chemistry"] <-13
d$alsubj5[d$edqsub60=="clasical civilisation"] <-14
d$alsubj5[d$edqsub60=="clasics"] <-14
d$alsubj5[d$edqsub60=="classical civilations"] <-14
d$alsubj5[d$edqsub60=="classical civilisation"] <-14
d$alsubj5[d$edqsub60=="CLASSICAL CIVILISATION"] <-14
d$alsubj5[d$edqsub60=="CLASSICAL CIVILISATIONS"] <-14
d$alsubj5[d$edqsub60=="CLASSICAL CIVILIZATION"] <-14
d$alsubj5[d$edqsub60=="CLASSICAL STUDIES"] <-14
d$alsubj5[d$edqsub60=="CLASSICS"] <-15
d$alsubj5[d$edqsub60=="COMMUNICATION STUDIES"] <-16
d$alsubj5[d$edqsub60=="communication studies"] <-16
d$alsubj5[d$edqsub60=="COMMUNICATIONS"] <-16
d$alsubj5[d$edqsub60=="COMMUNICATIONS STUDIES"] <-16
d$alsubj5[d$edqsub60=="Communications studies"] <-16
d$alsubj5[d$edqsub60=="applied computer science"] <-17
d$alsubj5[d$edqsub60=="comp studies"] <-17
d$alsubj5[d$edqsub60=="COMPTUTING SKILLS"] <-17
d$alsubj5[d$edqsub60=="COMPUTER PROGRAMMING"] <-17
d$alsubj5[d$edqsub60=="Computer Science"] <-17
d$alsubj5[d$edqsub60=="COMPUTER SCIENCE"] <-17
d$alsubj5[d$edqsub60=="computer science"] <-17
d$alsubj5[d$edqsub60=="computer sciences"] <-17
d$alsubj5[d$edqsub60=="Computer Sciencse"] <-17
d$alsubj5[d$edqsub60=="COMPUTER SICENCE"] <-17
d$alsubj5[d$edqsub60=="Computer Studies"] <-17
d$alsubj5[d$edqsub60=="Computer Studies"] <-17
d$alsubj5[d$edqsub60=="computer studies"] <-17
d$alsubj5[d$edqsub60=="Computer studies"] <-17
d$alsubj5[d$edqsub60=="computing"] <-17
d$alsubj5[d$edqsub60=="Computing"] <-17
d$alsubj5[d$edqsub60=="coputer science"] <-17
d$alsubj5[d$edqsub60=="information Technology"] <-17
d$alsubj5[d$edqsub60=="IT"] <-17
d$alsubj5[d$edqsub60=="Computer science S level"] <-18
d$alsubj5[d$edqsub60=="craft design and technolo"] <-19
d$alsubj5[d$edqsub60=="Design"] <-19
d$alsubj5[d$edqsub60=="design"] <-19
d$alsubj5[d$edqsub60=="DESIGN"] <-19
d$alsubj5[d$edqsub60=="dESIGN & tECHNOLGY"] <-19
d$alsubj5[d$edqsub60=="Design & Technology"] <-19
d$alsubj5[d$edqsub60=="design and technology"] <-19
d$alsubj5[d$edqsub60=="Design and Technology"] <-19
d$alsubj5[d$edqsub60=="design craft and technolo"] <-19
d$alsubj5[d$edqsub60=="design technology"] <-19
d$alsubj5[d$edqsub60=="DESIGN TECHNOLOGY"] <-19
d$alsubj5[d$edqsub60=="c.d.t"] <-19
d$alsubj5[d$edqsub60=="technology"] <-19
d$alsubj5[d$edqsub60=="Technology"] <-19
d$alsubj5[d$edqsub60=="DRAMA"] <-20
d$alsubj5[d$edqsub60=="Drama"] <-20
d$alsubj5[d$edqsub60=="drama and theatre arts"] <-20
d$alsubj5[d$edqsub60=="dance"] <-20
d$alsubj5[d$edqsub60=="Dance and Drama"] <-20
d$alsubj5[d$edqsub60=="ECCONOMICS"] <-21
d$alsubj5[d$edqsub60=="ecomics"] <-21
d$alsubj5[d$edqsub60=="ECOMICS"] <-21
d$alsubj5[d$edqsub60=="ecomincs"] <-21
d$alsubj5[d$edqsub60=="Ecomonics"] <-21
d$alsubj5[d$edqsub60=="ecomopmics"] <-21
d$alsubj5[d$edqsub60=="econ"] <-21
d$alsubj5[d$edqsub60=="ECON"] <-21
d$alsubj5[d$edqsub60=="ECONIICS"] <-21
d$alsubj5[d$edqsub60=="Econimics"] <-21
d$alsubj5[d$edqsub60=="econimics"] <-21
d$alsubj5[d$edqsub60=="Econimins"] <-21
d$alsubj5[d$edqsub60=="Econmics"] <-21
d$alsubj5[d$edqsub60=="econo;mics"] <-21
d$alsubj5[d$edqsub60=="ECONOMIC"] <-21
d$alsubj5[d$edqsub60=="Economic"] <-21
d$alsubj5[d$edqsub60=="economic and social histo"] <-21
d$alsubj5[d$edqsub60=="economices"] <-21
d$alsubj5[d$edqsub60=="economics"] <-21
d$alsubj5[d$edqsub60=="Economics"] <-21
d$alsubj5[d$edqsub60=="ECONOMICS"] <-21
d$alsubj5[d$edqsub60=="economics & politics"] <-21
d$alsubj5[d$edqsub60=="Economics & World Affairs"] <-21
d$alsubj5[d$edqsub60=="economics with politics"] <-21
d$alsubj5[d$edqsub60=="economicse"] <-21
d$alsubj5[d$edqsub60=="economis and world affair"] <-21
d$alsubj5[d$edqsub60=="Ecvonomics"] <-21
d$alsubj5[d$edqsub60=="encominics"] <-21
d$alsubj5[d$edqsub60=="ECONOMICS AT S LEVEL"] <-22
d$alsubj5[d$edqsub60=="Electronic Systems"] <-23
d$alsubj5[d$edqsub60=="ELECTRONIC\S#"] <-23
d$alsubj5[d$edqsub60=="eLECTRONICS"] <-23
d$alsubj5[d$edqsub60=="Electronics"] <-23
d$alsubj5[d$edqsub60=="electronics"] <-23
d$alsubj5[d$edqsub60=="ELECTRONICS"] <-23
d$alsubj5[d$edqsub60=="Electronics"] <-23
d$alsubj5[d$edqsub60=="electronics/statistics"] <-23
d$alsubj5[d$edqsub60=="microelectronics"] <-23
d$alsubj5[d$edqsub60=="ENGINEERING"] <-24
d$alsubj5[d$edqsub60=="ENGINEERING DRAWING"] <-24
d$alsubj5[d$edqsub60=="Engineering Drawing"] <-24
d$alsubj5[d$edqsub60=="Engineering drawing"] <-24
d$alsubj5[d$edqsub60=="engineering drawing"] <-24
d$alsubj5[d$edqsub60=="ENGINEERING DRAWING AND D"] <-24
d$alsubj5[d$edqsub60=="ENGINEERING METALWORK"] <-24
d$alsubj5[d$edqsub60=="ENGINEERING SCIENCE"] <-24
d$alsubj5[d$edqsub60=="Geometric and Engineering"] <-24
d$alsubj5[d$edqsub60=="combined english"] <-25
d$alsubj5[d$edqsub60=="ebglish"] <-25
d$alsubj5[d$edqsub60=="En g Lit"] <-25
d$alsubj5[d$edqsub60=="eng"] <-25
d$alsubj5[d$edqsub60=="ENG"] <-25
d$alsubj5[d$edqsub60=="ENG .LIT"] <-25
d$alsubj5[d$edqsub60=="eng lang"] <-25
d$alsubj5[d$edqsub60=="ENG LANG"] <-25
d$alsubj5[d$edqsub60=="Eng Lang"] <-25
d$alsubj5[d$edqsub60=="eng language/literature"] <-25
d$alsubj5[d$edqsub60=="ENG LIT"] <-25
d$alsubj5[d$edqsub60=="eng lit"] <-25
d$alsubj5[d$edqsub60=="Eng lit"] <-25
d$alsubj5[d$edqsub60=="eng lit."] <-25
d$alsubj5[d$edqsub60=="eng Slevel"] <-25
d$alsubj5[d$edqsub60=="Eng. Lit"] <-25
d$alsubj5[d$edqsub60=="ENG. LIT"] <-25
d$alsubj5[d$edqsub60=="Eng. Lit."] <-25
d$alsubj5[d$edqsub60=="ENG.LIT 1"] <-25
d$alsubj5[d$edqsub60=="eng.lit."] <-25
d$alsubj5[d$edqsub60=="eng/language."] <-25
d$alsubj5[d$edqsub60=="engl"] <-25
d$alsubj5[d$edqsub60=="English"] <-25
d$alsubj5[d$edqsub60=="ENGLISH"] <-25
d$alsubj5[d$edqsub60=="english"] <-25
d$alsubj5[d$edqsub60=="English  lit."] <-25
d$alsubj5[d$edqsub60=="English  lit."] <-25
d$alsubj5[d$edqsub60=="English (Literature)"] <-25
d$alsubj5[d$edqsub60=="ENGLISH ;LITERATURE"] <-25
d$alsubj5[d$edqsub60=="ENGLISH LANG"] <-25
d$alsubj5[d$edqsub60=="english lang"] <-25
d$alsubj5[d$edqsub60=="ENGLISH LANG & LIT"] <-25
d$alsubj5[d$edqsub60=="English Lang and Lit"] <-25
d$alsubj5[d$edqsub60=="English Lang."] <-25
d$alsubj5[d$edqsub60=="english lang.& lit."] <-25
d$alsubj5[d$edqsub60=="English lang/lit"] <-25
d$alsubj5[d$edqsub60=="ENGLISH LANG/LIT"] <-25
d$alsubj5[d$edqsub60=="english language"] <-25
d$alsubj5[d$edqsub60=="English Language"] <-25
d$alsubj5[d$edqsub60=="english language"] <-25
d$alsubj5[d$edqsub60=="ENGLISH LANGUAGE"] <-25
d$alsubj5[d$edqsub60=="English language"] <-25
d$alsubj5[d$edqsub60=="english Language"] <-25
d$alsubj5[d$edqsub60=="English language & Litera"] <-25
d$alsubj5[d$edqsub60=="english language & litera"] <-25
d$alsubj5[d$edqsub60=="ENGLISH LANGUAGE AND LIT"] <-25
d$alsubj5[d$edqsub60=="ENGLISH LANGUAGE AND LITE"] <-25
d$alsubj5[d$edqsub60=="english language/literatu"] <-25
d$alsubj5[d$edqsub60=="english lit"] <-25
d$alsubj5[d$edqsub60=="ENGLISH LIT"] <-25
d$alsubj5[d$edqsub60=="English Lit"] <-25
d$alsubj5[d$edqsub60=="english lit and lang"] <-25
d$alsubj5[d$edqsub60=="ENGLISH LIT AND LANGUAGE"] <-25
d$alsubj5[d$edqsub60=="english lit."] <-25
d$alsubj5[d$edqsub60=="English lit."] <-25
d$alsubj5[d$edqsub60=="ENGLISH LIT."] <-25
d$alsubj5[d$edqsub60=="English lit/lang"] <-25
d$alsubj5[d$edqsub60=="english litand language"] <-25
d$alsubj5[d$edqsub60=="english litature"] <-25
d$alsubj5[d$edqsub60=="ENGLISH LITERATURE"] <-25
d$alsubj5[d$edqsub60=="English Literature"] <-25
d$alsubj5[d$edqsub60=="english literature"] <-25
d$alsubj5[d$edqsub60=="English literature"] <-25
d$alsubj5[d$edqsub60=="English Literature & Lang"] <-25
d$alsubj5[d$edqsub60=="ENGLISH LITERATURE & LANG"] <-25
d$alsubj5[d$edqsub60=="English Literature/Lang."] <-25
d$alsubj5[d$edqsub60=="English Litereature"] <-25
d$alsubj5[d$edqsub60=="ENGLISH LITERTURA"] <-25
d$alsubj5[d$edqsub60=="English Litterature"] <-25
d$alsubj5[d$edqsub60=="english not specific"] <-25
d$alsubj5[d$edqsub60=="ENLISH"] <-25
d$alsubj5[d$edqsub60=="ENLISH LANGUAGE/LITERATUR"] <-25
d$alsubj5[d$edqsub60=="Environmental Sc"] <-62
d$alsubj5[d$edqsub60=="environmental science"] <-62
d$alsubj5[d$edqsub60=="Environmental Studies"] <-62
d$alsubj5[d$edqsub60=="Fashion"] <-52
d$alsubj5[d$edqsub60=="fashion"] <-52
d$alsubj5[d$edqsub60=="Fashion & textiles"] <-52
d$alsubj5[d$edqsub60=="fashion and design"] <-52
d$alsubj5[d$edqsub60=="fashion and fabric"] <-52
d$alsubj5[d$edqsub60=="Fashion design"] <-52
d$alsubj5[d$edqsub60=="film studies"]					<-26
d$alsubj5[d$edqsub60=="FILM STUDIES"] <-26
d$alsubj5[d$edqsub60=="freanch"] <-27
d$alsubj5[d$edqsub60=="frech"	] <-27
d$alsubj5[d$edqsub60=="FRENCH"] <-27
d$alsubj5[d$edqsub60=="french"] <-27
d$alsubj5[d$edqsub60=="French"] <-27
d$alsubj5[d$edqsub60=="french for business"] <-27
d$alsubj5[d$edqsub60=="french lang"] 					<-27		
d$alsubj5[d$edqsub60=="French Literature"] <-27
d$alsubj5[d$edqsub60=="FRENCH1"] <-27
d$alsubj5[d$edqsub60=="French S level"] <-28
d$alsubj5[d$edqsub60=="Furhther Maths"] <-29
d$alsubj5[d$edqsub60=="further math"] <-29
d$alsubj5[d$edqsub60=="further mathematics"] <-29
d$alsubj5[d$edqsub60=="Further mathematics"] <-29
d$alsubj5[d$edqsub60=="FURTHER MATHEMATICS"] <-29
d$alsubj5[d$edqsub60=="Further Mathematics"] <-29
d$alsubj5[d$edqsub60=="further maths"] <-29
d$alsubj5[d$edqsub60=="Further Maths"] <-29
d$alsubj5[d$edqsub60=="Futher maths"] <-29
d$alsubj5[d$edqsub60=="FURTHER MATHS"] <-29
d$alsubj5[d$edqsub60=="FURTHER MATH"] <-29
d$alsubj5[d$edqsub60=="Further Maths - Pure and"] <-29
d$alsubj5[d$edqsub60=="FURTHER MATHS A LEVEL"] <-29
d$alsubj5[d$edqsub60=="FUTHER MATHS"] <-29
d$alsubj5[d$edqsub60=="further maths (s)"] <-30
d$alsubj5[d$edqsub60=="FURTHER MATHS S LEVEL"] <-30
d$alsubj5[d$edqsub60=="FURTHER MATHS STEP"] <-30
d$alsubj5[d$edqsub60=="S level further maths"] <-30
d$alsubj5[d$edqsub60=="GEN STUD"] <-31
d$alsubj5[d$edqsub60=="gen stud"] <-31
d$alsubj5[d$edqsub60=="gen studies"] <-31
d$alsubj5[d$edqsub60=="GEN STUDIES"] <-31
d$alsubj5[d$edqsub60=="Gen studies"] <-31
d$alsubj5[d$edqsub60=="Gen Studies"] <-31
d$alsubj5[d$edqsub60=="GEN STUDIES RELIGIOUS STU"] <-31
d$alsubj5[d$edqsub60=="gen. studies"] <-31
d$alsubj5[d$edqsub60=="gen.studies"] <-31
d$alsubj5[d$edqsub60=="general"] <-31
d$alsubj5[d$edqsub60=="GENERAL"] <-31
d$alsubj5[d$edqsub60=="general   studies"] <-31
d$alsubj5[d$edqsub60=="general  tudies"] <-31
d$alsubj5[d$edqsub60=="general knowl;edfge"] <-31
d$alsubj5[d$edqsub60=="GENERAL STIUDIES"] <-31
d$alsubj5[d$edqsub60=="GENERAL STUDIES"] <-31
d$alsubj5[d$edqsub60=="general studies"] <-31
d$alsubj5[d$edqsub60=="General studies"] <-31
d$alsubj5[d$edqsub60=="General Studies"] <-31
d$alsubj5[d$edqsub60=="GENERAL STUDY"] <-31
d$alsubj5[d$edqsub60=="general study"] <-31
d$alsubj5[d$edqsub60=="general studys"] <-31
d$alsubj5[d$edqsub60=="Genereal Studies"] <-31
d$alsubj5[d$edqsub60=="genstudies"] <-31
d$alsubj5[d$edqsub60=="1GEOGRAPHY"] <-32
d$alsubj5[d$edqsub60=="gegraphy"] <-32
d$alsubj5[d$edqsub60=="GEGRAPHY"] <-32
d$alsubj5[d$edqsub60=="geoagraphy"] <-32
d$alsubj5[d$edqsub60=="geog"] <-32
d$alsubj5[d$edqsub60=="Geog"] <-32
d$alsubj5[d$edqsub60=="GEOG"] <-32
d$alsubj5[d$edqsub60=="GEOGHRAY"] <-32
d$alsubj5[d$edqsub60=="geogr"] <-32
d$alsubj5[d$edqsub60=="GEOGRAGHY"] <-32
d$alsubj5[d$edqsub60=="GEOGRAHY"] <-32
d$alsubj5[d$edqsub60=="geographt"] <-32
d$alsubj5[d$edqsub60=="GEOGRAPHY"] <-32
d$alsubj5[d$edqsub60=="Geography"] <-32
d$alsubj5[d$edqsub60=="geography"] <-32
d$alsubj5[d$edqsub60=="geography grade d"] <-32
d$alsubj5[d$edqsub60=="geographyy"] <-32
d$alsubj5[d$edqsub60=="geograqphy"] <-32
d$alsubj5[d$edqsub60=="geophraphy"] <-32
d$alsubj5[d$edqsub60=="gepgraphy"] <-32
d$alsubj5[d$edqsub60=="GOEG"] <-32
d$alsubj5[d$edqsub60=="goegraphy"] <-32
d$alsubj5[d$edqsub60=="goegraphy"] <-32
d$alsubj5[d$edqsub60=="geog   s level"] <-33
d$alsubj5[d$edqsub60=="geog s level"] <-33
d$alsubj5[d$edqsub60=="GEOGRAPHY S LEVEL"] <-33
d$alsubj5[d$edqsub60=="geography s level"] <-33
d$alsubj5[d$edqsub60=="geology"] <-34
d$alsubj5[d$edqsub60=="Geology"] <-34
d$alsubj5[d$edqsub60=="GEOLOGY"] <-34
d$alsubj5[d$edqsub60=="German"] <-35
d$alsubj5[d$edqsub60=="german"] <-35
d$alsubj5[d$edqsub60=="GERMAN"] <-35
d$alsubj5[d$edqsub60=="German S level"] <-35
d$alsubj5[d$edqsub60=="German."] <-35
d$alsubj5[d$edqsub60=="gevernment politics"] <-36
d$alsubj5[d$edqsub60=="govenment and politics"] <-36
d$alsubj5[d$edqsub60=="GOVERNMENT"] <-36
d$alsubj5[d$edqsub60=="Government & politics"] <-36
d$alsubj5[d$edqsub60=="GOVERNMENT & POLITICS"] <-36
d$alsubj5[d$edqsub60=="GOVERNMENT & POLITICS"] <-36
d$alsubj5[d$edqsub60=="GOVERNMENT AND POLITICAL"] <-36
d$alsubj5[d$edqsub60=="GOVERNMENT AND POLITICS"] <-36
d$alsubj5[d$edqsub60=="government and politics"] <-36
d$alsubj5[d$edqsub60=="Government and Politics"] <-36
d$alsubj5[d$edqsub60=="GOVERNMENT POLITICS"] <-36
d$alsubj5[d$edqsub60=="governmental politics"] <-36
d$alsubj5[d$edqsub60=="Govrnment and politics"] <-36
d$alsubj5[d$edqsub60=="Govt and politics"] <-36
d$alsubj5[d$edqsub60=="GOVT AND POLITICS"] <-36
d$alsubj5[d$edqsub60=="GOVT. AND POLITICS"] <-36
d$alsubj5[d$edqsub60=="govt/politics"] <-36
d$alsubj5[d$edqsub60=="GRAPHIC \DESIGN"] <-37
d$alsubj5[d$edqsub60=="GRAPHIC DESIGN"] <-37
d$alsubj5[d$edqsub60=="Graphic Design"] <-37
d$alsubj5[d$edqsub60=="graphic design"] <-37
d$alsubj5[d$edqsub60=="graphical communication"] <-37
d$alsubj5[d$edqsub60=="Graphical communication"] <-37
d$alsubj5[d$edqsub60=="gre ke"] <-38
d$alsubj5[d$edqsub60=="GREEK"] <-38
d$alsubj5[d$edqsub60=="greek"] <-38
d$alsubj5[d$edqsub60== "MODERN GREEK"] <-38
d$alsubj5[d$edqsub60==";history"] <-39
d$alsubj5[d$edqsub60=="19 centuary british and e"] <-39
d$alsubj5[d$edqsub60=="American History"] <-39
d$alsubj5[d$edqsub60=="HIDTORY"] <-39
d$alsubj5[d$edqsub60=="hist"] <-39
d$alsubj5[d$edqsub60=="History"] <-39
d$alsubj5[d$edqsub60=="HISTORY"] <-39
d$alsubj5[d$edqsub60=="history"] <-39
d$alsubj5[d$edqsub60=="History (modern)"] <-39
d$alsubj5[d$edqsub60=="History."] <-39
d$alsubj5[d$edqsub60=="Histoy"] <-39
d$alsubj5[d$edqsub60=="histroy"] <-39
d$alsubj5[d$edqsub60=="medeaevil history"] <-39
d$alsubj5[d$edqsub60=="MEDIEVAL HISTORY"] <-39
d$alsubj5[d$edqsub60=="MODERN HISTORY"] <-39
d$alsubj5[d$edqsub60=="Social & Economic History"] <-39
d$alsubj5[d$edqsub60=="Social and economic histo"] <-39
d$alsubj5[d$edqsub60=="HISTORY S LEVEL"] <-40
d$alsubj5[d$edqsub60=="history S level"] <-40
d$alsubj5[d$edqsub60=="hum,an bilogy"] <-62
d$alsubj5[d$edqsub60=="human  biology"] <-62
d$alsubj5[d$edqsub60=="human biology"] <-62
d$alsubj5[d$edqsub60=="Human biology"] <-62
d$alsubj5[d$edqsub60=="Human Biology"] <-62
d$alsubj5[d$edqsub60=="human physiology"] <-62
d$alsubj5[d$edqsub60=="HUMAN BIOLOGY"] <-62
d$alsubj5[d$edqsub60=="HUMAN PHYSIOLOGY"] <-62
d$alsubj5[d$edqsub60=="humanbiology"] <-62
d$alsubj5[d$edqsub60=="humanphysiology"] <-62
d$alsubj5[d$edqsub60=="industrila studies"] <-41
d$alsubj5[d$edqsub60=="Industrial Studies"] <-41
d$alsubj5[d$edqsub60=="Italian"] <-42
d$alsubj5[d$edqsub60=="LATIN"] <-43
d$alsubj5[d$edqsub60=="latin"] <-43
d$alsubj5[d$edqsub60=="Latin"] <-43
d$alsubj5[d$edqsub60=="Latin S level"] <-44
d$alsubj5[d$edqsub60=="latin s level"] <-44
d$alsubj5[d$edqsub60=="LATIN SPECIAL"] <-44
d$alsubj5[d$edqsub60=="English Law."] <-45
d$alsubj5[d$edqsub60=="criminal law"] <-45
d$alsubj5[d$edqsub60=="Law"] <-45
d$alsubj5[d$edqsub60=="law"] <-45
d$alsubj5[d$edqsub60=="LAW"] <-45
d$alsubj5[d$edqsub60=="low"] <-45
d$alsubj5[d$edqsub60=="applied and pure maths"] <-46
d$alsubj5[d$edqsub60=="Applied Mathematics"] <-46
d$alsubj5[d$edqsub60=="applied mathematics"] <-46
d$alsubj5[d$edqsub60=="APPLIED MATHS"] <-46
d$alsubj5[d$edqsub60=="applied maths"] <-46
d$alsubj5[d$edqsub60=="Applied Maths"] <-46
d$alsubj5[d$edqsub60=="combined maths"] <-46
d$alsubj5[d$edqsub60=="Maaths"] <-46
d$alsubj5[d$edqsub60=="Matematics"] <-46
d$alsubj5[d$edqsub60=="MATH"] <-46
d$alsubj5[d$edqsub60=="math"] <-46
d$alsubj5[d$edqsub60=="Math & General knowladge"] <-46
d$alsubj5[d$edqsub60=="Mathematics"] <-46
d$alsubj5[d$edqsub60=="mATHEMATICS"] <-46
d$alsubj5[d$edqsub60=="MATHEMATICS"] <-46
d$alsubj5[d$edqsub60=="mathematics"] <-46
d$alsubj5[d$edqsub60=="MATHEMATICS - PURE/APLIED"] <-46
d$alsubj5[d$edqsub60=="mathematics and art"] <-46
d$alsubj5[d$edqsub60=="Mathematics and Statistic"] <-46
d$alsubj5[d$edqsub60=="Mathematics with stats"] <-46
d$alsubj5[d$edqsub60=="mathematics, pure and app"] <-46
d$alsubj5[d$edqsub60=="MATHMATICS AND STATISTICS"] <-46
d$alsubj5[d$edqsub60=="Maths"] <-46
d$alsubj5[d$edqsub60=="maths"] <-46
d$alsubj5[d$edqsub60=="MATHS"] <-46
d$alsubj5[d$edqsub60=="maths & mechanics"] <-46
d$alsubj5[d$edqsub60=="Maths & Statistics"] <-46
d$alsubj5[d$edqsub60=="maths & statistics"] <-46
d$alsubj5[d$edqsub60=="Maths (pure and Applied)"] <-46
d$alsubj5[d$edqsub60=="Maths /pure and applied"] <-46
d$alsubj5[d$edqsub60=="maths + stats"] <-46
d$alsubj5[d$edqsub60=="MATHS A LEVEL"] <-46
d$alsubj5[d$edqsub60=="maths an"] <-46
d$alsubj5[d$edqsub60=="MATHS AND STATISTICS"] <-46
d$alsubj5[d$edqsub60=="maths and statistics"] <-46
d$alsubj5[d$edqsub60=="Maths and stats"] <-46
d$alsubj5[d$edqsub60=="MATHS AND STATS"] <-46
d$alsubj5[d$edqsub60=="maths AS"] <-46
d$alsubj5[d$edqsub60=="maths pure"] <-46
d$alsubj5[d$edqsub60=="maths pure and applied"] <-46
d$alsubj5[d$edqsub60=="MATHS- PURE AND APPLIED"] <-46
d$alsubj5[d$edqsub60=="Maths pure l& applied"] <-46
d$alsubj5[d$edqsub60=="MATHS S LEVEL"] <-46
d$alsubj5[d$edqsub60=="MATHS WITH STATISTICS"] <-46
d$alsubj5[d$edqsub60=="maths with statistics"] <-46
d$alsubj5[d$edqsub60=="maths with stats"] <-46
d$alsubj5[d$edqsub60=="Maths with stats."] <-46
d$alsubj5[d$edqsub60=="MATHS, PURE AND APPLIED"] <-46
d$alsubj5[d$edqsub60=="maths."] <-46
d$alsubj5[d$edqsub60=="MATHS."] <-46
d$alsubj5[d$edqsub60=="Maths."] <-46
d$alsubj5[d$edqsub60=="Maths/pure and applied"] <-46
d$alsubj5[d$edqsub60=="Maths/Statistics"] <-46
d$alsubj5[d$edqsub60=="MATHSW"] <-46
d$alsubj5[d$edqsub60=="Mathsw"] <-46
d$alsubj5[d$edqsub60=="mechanics"] <-46
d$alsubj5[d$edqsub60=="MMaths"] <-46
d$alsubj5[d$edqsub60=="PURE & APPL MATHS"] <-46
d$alsubj5[d$edqsub60=="Pure & Applied Maths"] <-46
d$alsubj5[d$edqsub60=="pure and applied maths"] <-46
d$alsubj5[d$edqsub60=="PURE AND APPLIED MATHS"] <-46
d$alsubj5[d$edqsub60=="Pure M aths & Statistics"] <-46
d$alsubj5[d$edqsub60=="pure mathematics"] <-46
d$alsubj5[d$edqsub60=="PURE MATHEMATICS"] <-46
d$alsubj5[d$edqsub60=="pure mathematics"] <-46
d$alsubj5[d$edqsub60=="pure maths"] <-46
d$alsubj5[d$edqsub60=="PURE MATHS"] <-46
d$alsubj5[d$edqsub60=="Pure maths"] <-46
d$alsubj5[d$edqsub60=="Pure Maths"] <-46
d$alsubj5[d$edqsub60=="Pure Maths & Mechanics"] <-46
d$alsubj5[d$edqsub60=="Pure Maths & Statistics"] <-46
d$alsubj5[d$edqsub60=="Pure Maths & Stats"] <-46
d$alsubj5[d$edqsub60=="pure maths and statistics"] <-46
d$alsubj5[d$edqsub60=="PURE MATHS AND STATISTICS"] <-46
d$alsubj5[d$edqsub60=="PURE MATHS AND STATS"] <-46
d$alsubj5[d$edqsub60=="pure maths and stats"] <-46
d$alsubj5[d$edqsub60=="PURE MATHS WITH STATISTIC"] <-46
d$alsubj5[d$edqsub60=="pure maths with statistic"] <-46
d$alsubj5[d$edqsub60=="Pure maths with stats"] <-46
d$alsubj5[d$edqsub60=="PURE MATHS WITH STATS"] <-46
d$alsubj5[d$edqsub60=="pure maths with stats."] <-46
d$alsubj5[d$edqsub60=="pure maths witih stats."] <-46
d$alsubj5[d$edqsub60=="pure maths/statistics"] <-46
d$alsubj5[d$edqsub60=="pure/statistal maths"] <-46
d$alsubj5[d$edqsub60=="stastics"] <-46
d$alsubj5[d$edqsub60=="statisics"] <-46
d$alsubj5[d$edqsub60=="STATISTICS"] <-46
d$alsubj5[d$edqsub60=="statistics"] <-46
d$alsubj5[d$edqsub60=="Statistics"] <-46
d$alsubj5[d$edqsub60=="stats"] <-46
d$alsubj5[d$edqsub60=="STATS"] <-46
d$alsubj5[d$edqsub60=="Applied Maths S level"] <-47
d$alsubj5[d$edqsub60=="Maths S/level"] <-46
d$alsubj5[d$edqsub60=="S level maths"] <-46
d$alsubj5[d$edqsub60=="s' level maths"] <-46
d$alsubj5[d$edqsub60=="Step maths"] <-46
d$alsubj5[d$edqsub60=="MEDIA"] <-48
d$alsubj5[d$edqsub60=="Media studies"] <-48
d$alsubj5[d$edqsub60=="music"] <-49
d$alsubj5[d$edqsub60=="Music"] <-49
d$alsubj5[d$edqsub60=="MUSIC"] <-49
d$alsubj5[d$edqsub60=="music practical"] <-49
d$alsubj5[d$edqsub60=="music theory"] <-49
d$alsubj5[d$edqsub60=="Practical music"] <-49
d$alsubj5[d$edqsub60=="Rudiments of Music"] <-49
d$alsubj5[d$edqsub60=="STAGE DECOR AND COSTUME D"] <-50
d$alsubj5[d$edqsub60=="FINANCIAL CONTROL"] <-50
d$alsubj5[d$edqsub60=="ceramics"] <-51
d$alsubj5[d$edqsub60=="CRAFT"] <-51
d$alsubj5[d$edqsub60=="CRAFT DESIGN & THEATRE ST"] <-51
d$alsubj5[d$edqsub60=="POTTERY"] <-51
d$alsubj5[d$edqsub60=="printing"] <-52
d$alsubj5[d$edqsub60=="TEXTILE AND DRESS"] <-52
d$alsubj5[d$edqsub60=="DRESS"] <-52
d$alsubj5[d$edqsub60=="dress and design"] <-52
d$alsubj5[d$edqsub60=="FOOD AND NUTRITION"] <-52
d$alsubj5[d$edqsub60=="food and nutrition"] <-52
d$alsubj5[d$edqsub60=="home econimics"] <-52
d$alsubj5[d$edqsub60=="home economic"] <-52
d$alsubj5[d$edqsub60=="HOME ECONOMICS"] <-52
d$alsubj5[d$edqsub60=="Home Economics"] <-52
d$alsubj5[d$edqsub60=="home economics"] <-52
d$alsubj5[d$edqsub60=="home economics - sewing"] <-52
d$alsubj5[d$edqsub60=="Home economics."] <-52
d$alsubj5[d$edqsub60=="HOME, FAMILY AND SOCIETY"] <-52
d$alsubj5[d$edqsub60=="HOME, FAMILY AND SOCIETY"] <-52
d$alsubj5[d$edqsub60=="CONFECTIONERY TECHNOLOGY"] <-52
d$alsubj5[d$edqsub60=="cookery"] <-52
d$alsubj5[d$edqsub60=="COOKERY"] <-52
d$alsubj5[d$edqsub60=="Domestic Science"] <-52
d$alsubj5[d$edqsub60=="surveying"] <-52
d$alsubj5[d$edqsub60=="tech drawing"] <-52
d$alsubj5[d$edqsub60=="TECH DRAWING"] <-52
d$alsubj5[d$edqsub60=="tech drawing"] <-52
d$alsubj5[d$edqsub60=="TECHNICAL DRAWING"] <-52
d$alsubj5[d$edqsub60=="technical drawing"] <-52
d$alsubj5[d$edqsub60=="Technical DRawing"] <-52
d$alsubj5[d$edqsub60=="technical drawing"] <-52
d$alsubj5[d$edqsub60=="Technical Drawing"] <-52
d$alsubj5[d$edqsub60=="BUILDING CONSTRUCTION"] <-52
d$alsubj5[d$edqsub60=="building construction"] <-52
d$alsubj5[d$edqsub60=="Needlework"] <-52
d$alsubj5[d$edqsub60== "stage craft and design"] <-52
d$alsubj5[d$edqsub60=="SECIENE"] <-62
d$alsubj5[d$edqsub60=="Health Scencie"] <-62
d$alsubj5[d$edqsub60=="HEALTH STUDIES"] <-62
d$alsubj5[d$edqsub60=="Science in Society"] <-62
d$alsubj5[d$edqsub60=="philosophy"] <-54
d$alsubj5[d$edqsub60=="Philosophy"] <-54
d$alsubj5[d$edqsub60=="PHILOSOPHY"] <-54
d$alsubj5[d$edqsub60=="philosphy"] <-54
d$alsubj5[d$edqsub60=="phisics"] <-56
d$alsubj5[d$edqsub60=="PHOTOGRAPHY"] <-55
d$alsubj5[d$edqsub60=="photography"] <-55
d$alsubj5[d$edqsub60=="physical education"] <-68
d$alsubj5[d$edqsub60=="PHYSICAL EDUCATION"] <-68
d$alsubj5[d$edqsub60=="HPYSICS"] <-56
d$alsubj5[d$edqsub60=="PHSICS"] <-56
d$alsubj5[d$edqsub60=="phsics"] <-56
d$alsubj5[d$edqsub60=="phsyics"] <-56
d$alsubj5[d$edqsub60=="phycics"] <-56
d$alsubj5[d$edqsub60=="PHYS"] <-56
d$alsubj5[d$edqsub60=="phys/  maths"] <-56
d$alsubj5[d$edqsub60=="PHYSIC"] <-56
d$alsubj5[d$edqsub60=="PHYSICA"] <-56
d$alsubj5[d$edqsub60=="Physiccs"] <-56
d$alsubj5[d$edqsub60=="Physics"] <-56
d$alsubj5[d$edqsub60=="PHYSICS"] <-56
d$alsubj5[d$edqsub60=="physics"] <-56
d$alsubj5[d$edqsub60=="PHYSICS A LEVEL"] <-56
d$alsubj5[d$edqsub60=="PHYSICS WITH ELECTRONICS"] <-56
d$alsubj5[d$edqsub60=="Physics."] <-56
d$alsubj5[d$edqsub60=="PHYSYCS"] <-56
d$alsubj5[d$edqsub60=="pyschics"] <-56
d$alsubj5[d$edqsub60=="PYSICS"] <-56
d$alsubj5[d$edqsub60=="PHICS"] <-56
d$alsubj5[d$edqsub60=="physics (s)"] <-57
d$alsubj5[d$edqsub60=="Physics S/level"] <-57
d$alsubj5[d$edqsub60=="PHYSICS STEP"] <-57
d$alsubj5[d$edqsub60=="British and American Poli"] <-36
d$alsubj5[d$edqsub60=="BRITISH GOV AND POLITICS"] <-36
d$alsubj5[d$edqsub60=="BRITISH GOVERN AND POLITI"] <-36
d$alsubj5[d$edqsub60=="British government"] <-36
d$alsubj5[d$edqsub60=="british government and po"] <-36
d$alsubj5[d$edqsub60=="British Government l& Pol"] <-36
d$alsubj5[d$edqsub60=="British Govt and politics"] <-36
d$alsubj5[d$edqsub60=="polatics and government"] <-36
d$alsubj5[d$edqsub60=="POLICTICAL HISTORY"] <-36
d$alsubj5[d$edqsub60=="POLITICAL AND ECONOMIC ST"] <-36
d$alsubj5[d$edqsub60=="Political History"] <-36
d$alsubj5[d$edqsub60=="political History"] <-36
d$alsubj5[d$edqsub60=="political history"] <-36
d$alsubj5[d$edqsub60=="political science"] <-36
d$alsubj5[d$edqsub60=="Political Studies"] <-36
d$alsubj5[d$edqsub60=="political studiesd"] <-36
d$alsubj5[d$edqsub60=="politics"] <-36
d$alsubj5[d$edqsub60=="POLITICS"] <-36
d$alsubj5[d$edqsub60=="Politics"] <-36
d$alsubj5[d$edqsub60=="politics & economics"] <-36
d$alsubj5[d$edqsub60=="politics & government"] <-36
d$alsubj5[d$edqsub60=="politics and government"] <-36
d$alsubj5[d$edqsub60=="Politics."] <-36
d$alsubj5[d$edqsub60=="Phsychology"] <-59
d$alsubj5[d$edqsub60=="phsycology"] <-59
d$alsubj5[d$edqsub60=="phychology"] <-59
d$alsubj5[d$edqsub60=="PHYCOLOGY"] <-59
d$alsubj5[d$edqsub60=="phycology"] <-59
d$alsubj5[d$edqsub60=="physchology"] <-59
d$alsubj5[d$edqsub60=="Physchology"] <-59
d$alsubj5[d$edqsub60=="physclogy"] <-59
d$alsubj5[d$edqsub60=="Physco;ogy"] <-59
d$alsubj5[d$edqsub60=="PHYSCOLOGY"] <-59
d$alsubj5[d$edqsub60=="physology"] <-59
d$alsubj5[d$edqsub60=="pschology"] <-59
d$alsubj5[d$edqsub60=="pschology"] <-59
d$alsubj5[d$edqsub60=="pshycoclgy"] <-59
d$alsubj5[d$edqsub60=="PSYCHOLOGY"] <-59
d$alsubj5[d$edqsub60=="psychology"] <-59
d$alsubj5[d$edqsub60=="Psychology"] <-59
d$alsubj5[d$edqsub60=="Psycology"] <-59
d$alsubj5[d$edqsub60=="PSYCOLOGY"] <-59
d$alsubj5[d$edqsub60=="public affairs"] <-36
d$alsubj5[d$edqsub60=="PYSCOLOGY"] <-59
d$alsubj5[d$edqsub60=="Divinity"] <-60
d$alsubj5[d$edqsub60=="DIVINITY"] <-60
d$alsubj5[d$edqsub60=="r.e"] <-60
d$alsubj5[d$edqsub60=="R.E."] <-60
d$alsubj5[d$edqsub60=="R.e."] <-60
d$alsubj5[d$edqsub60=="RE"] <-60
d$alsubj5[d$edqsub60=="re"] <-60
d$alsubj5[d$edqsub60=="REL. STUDIES"] <-60
d$alsubj5[d$edqsub60=="relegious studies"] <-60
d$alsubj5[d$edqsub60=="philosi"] <-54
d$alsubj5[d$edqsub60=="RELIG STUDIES"] <-60
d$alsubj5[d$edqsub60=="religeous studies"] <-60
d$alsubj5[d$edqsub60=="religious education"] <-60
d$alsubj5[d$edqsub60=="Religious Education"] <-60
d$alsubj5[d$edqsub60=="RELIGIOUS EDUCATION"] <-60
d$alsubj5[d$edqsub60=="religious education"] <-60
d$alsubj5[d$edqsub60=="religious knowledge"] <-60
d$alsubj5[d$edqsub60=="religious studies"] <-60
d$alsubj5[d$edqsub60=="RELIGIOUS STUDIES"] <-60
d$alsubj5[d$edqsub60=="Religious studies"] <-60
d$alsubj5[d$edqsub60=="religous"] <-60
d$alsubj5[d$edqsub60=="Religous Education"] <-60
d$alsubj5[d$edqsub60=="scriptire"] <-60
d$alsubj5[d$edqsub60=="theology"] <-60
d$alsubj5[d$edqsub60=="russian"] <-61
d$alsubj5[d$edqsub60=="secretarial"] <-63
d$alsubj5[d$edqsub60=="SECRETARIAL"] <-63
d$alsubj5[d$edqsub60=="SECRETARIAL STUDIES"] <-63
d$alsubj5[d$edqsub60=="Secretarial studies"] <-63
d$alsubj5[d$edqsub60=="SOCIAL BIOLOGY"] <-62
d$alsubj5[d$edqsub60=="social biology"] <-62
d$alsubj5[d$edqsub60=="Social biology"] <-62
d$alsubj5[d$edqsub60=="Social Biology"] <-62
d$alsubj5[d$edqsub60=="SOCIAL POLICY ADMIN"] <-64
d$alsubj5[d$edqsub60=="SOCIAL POLICY"] <-64
d$alsubj5[d$edqsub60=="Social sciences"] <-65
d$alsubj5[d$edqsub60=="social studies"] <-65
d$alsubj5[d$edqsub60=="health and social care"] <-65
d$alsubj5[d$edqsub60=="SOCIALGY"] <-66
d$alsubj5[d$edqsub60=="socialogy"] <-66
d$alsubj5[d$edqsub60=="SOCIALOGY"] <-66
d$alsubj5[d$edqsub60=="Socialolgy"] <-66
d$alsubj5[d$edqsub60=="socialologu"] <-66
d$alsubj5[d$edqsub60=="Socialology"] <-66
d$alsubj5[d$edqsub60=="SOCIOLGY"] <-66
d$alsubj5[d$edqsub60=="socioligy"] <-66
d$alsubj5[d$edqsub60=="sociolocy"] <-66
d$alsubj5[d$edqsub60=="SOCIOLOGOY"] <-66
d$alsubj5[d$edqsub60=="SOCIOLOGY"] <-66
d$alsubj5[d$edqsub60=="Sociology"] <-66
d$alsubj5[d$edqsub60=="sociology"] <-66
d$alsubj5[d$edqsub60=="SOCIOPLOGY"] <-66
d$alsubj5[d$edqsub60=="spanish"] <-67
d$alsubj5[d$edqsub60=="Spanish"] <-67
d$alsubj5[d$edqsub60=="SPANISH"] <-67
d$alsubj5[d$edqsub60=="spannish"] <-67
d$alsubj5[d$edqsub60=="sports studies"] <-68
d$alsubj5[d$edqsub60=="SPORTS STUDIES"] <-68
d$alsubj5[d$edqsub60=="Sports Studies"] <-68
d$alsubj5[d$edqsub60=="theater studies"] <-69
d$alsubj5[d$edqsub60=="Theatre Arts"] <-69
d$alsubj5[d$edqsub60=="THEATRE STUDIEAS"] <-69
d$alsubj5[d$edqsub60=="theatre studies"] <-69
d$alsubj5[d$edqsub60=="Theatre studies"] <-69
d$alsubj5[d$edqsub60=="Theatre Studies"] <-69
d$alsubj5[d$edqsub60=="THEATRE STUDIES"] <-69
d$alsubj5[d$edqsub60=="theatre studys"] <-69
d$alsubj5[d$edqsub60=="theatre stuides"] <-69
d$alsubj5[d$edqsub60=="Urban Studies"] <-51
d$alsubj5[d$edqsub60=="Urdu"] <-70
d$alsubj5[d$edqsub60=="welsh"] <-71
d$alsubj5[d$edqsub60=="WELSH"] <-71
d$alsubj5[d$edqsub60=="war and society"] <-51
d$alsubj5[d$edqsub60=="ZOOLOGY"] <-62
d$alsubj5[d$edqsub60=="zoology"] <-62
d$alsubj5[d$edqsub60=="MANAGEMENT"] <-51
d$alsubj5[d$edqsub60=="modern studies"] <-51
d$alsubj5[d$edqsub60=="MODERN STUDIES"] <-51

# A-level subject 6
d$alsubj6<-NA
d$alsubj6[d$edqsub61=="ACCOUNT AND BUSINESS"] <-1
d$alsubj6[d$edqsub61=="ACCOUNTANCY"] <-1
d$alsubj6[d$edqsub61=="accountancy"] <-1
d$alsubj6[d$edqsub61=="Accountancy"] <-1
d$alsubj6[d$edqsub61=="accountancy"] <-1
d$alsubj6[d$edqsub61=="Accounting"] <-1
d$alsubj6[d$edqsub61=="Accounts"] <-1
d$alsubj6[d$edqsub61=="accounts"] <-1
d$alsubj6[d$edqsub61=="ACCOUNTS"] <-1
d$alsubj6[d$edqsub61=="accounts(business studies"] <-1
d$alsubj6[d$edqsub61=="acounts"] <-1
d$alsubj6[d$edqsub61=="ancient greek"] 		<-2
d$alsubj6[d$edqsub61=="ancient history"] <-3
d$alsubj6[d$edqsub61=="ANCIENT HISTORY"] <-3
d$alsubj6[d$edqsub61=="Ancient History"] <-3
d$alsubj6[d$edqsub61=="ANCIENT HISTORYU"] <-3
d$alsubj6[d$edqsub61=="archaeology"] <-4
d$alsubj6[d$edqsub61=="Archaeology"] <-4
d$alsubj6[d$edqsub61=="2 dimensional art"] <-5
d$alsubj6[d$edqsub61=="art"] <-5
d$alsubj6[d$edqsub61=="3 dimensional art"] <-5
d$alsubj6[d$edqsub61=="Art"] <-5
d$alsubj6[d$edqsub61=="ART"] <-5
d$alsubj6[d$edqsub61=="ARTS"] <-5
d$alsubj6[d$edqsub61=="fine art"] <-5
d$alsubj6[d$edqsub61=="FINE ART"] <-5
d$alsubj6[d$edqsub61=="STUDY OF ART"] <-5
d$alsubj6[d$edqsub61=="Art & Craft"] <-5
d$alsubj6[d$edqsub61=="Art & Design"] <-5
d$alsubj6[d$edqsub61=="art & design technology"] <-5
d$alsubj6[d$edqsub61=="ART 7 DESIGN"] <-5
d$alsubj6[d$edqsub61=="ART AND ART HISTORY"] <-5
d$alsubj6[d$edqsub61=="Art and Art History"] <-5
d$alsubj6[d$edqsub61=="art and crafts"] <-5
d$alsubj6[d$edqsub61=="Art and design"] <-5
d$alsubj6[d$edqsub61=="ART AND DESIGN"] <-5
d$alsubj6[d$edqsub61=="art/design"] <-5
d$alsubj6[d$edqsub61=="art history"] <-5
d$alsubj6[d$edqsub61=="Art History"] <-5
d$alsubj6[d$edqsub61=="art with art history"] <-5
d$alsubj6[d$edqsub61=="ART WITH ART HISTORY"] <-5
d$alsubj6[d$edqsub61=="art/art history"] <-5
d$alsubj6[d$edqsub61=="Art/Art History"] <-5
d$alsubj6[d$edqsub61=="history of aft"] <-5
d$alsubj6[d$edqsub61=="History of art"] <-5
d$alsubj6[d$edqsub61=="History of Art"] <-5
d$alsubj6[d$edqsub61=="bilogy"] <-6
d$alsubj6[d$edqsub61=="biol"] <-6
d$alsubj6[d$edqsub61=="biol;gy"] <-6
d$alsubj6[d$edqsub61=="Biology"] <-6
d$alsubj6[d$edqsub61=="biology"] <-6
d$alsubj6[d$edqsub61=="BIOLOGY"] <-6
d$alsubj6[d$edqsub61=="biology  c"] <-6
d$alsubj6[d$edqsub61=="Biology - retake"] <-6
d$alsubj6[d$edqsub61=="boilogy"] <-6
d$alsubj6[d$edqsub61=="BOTTANY"] <-6
d$alsubj6[d$edqsub61=="practical biology"] <-6
d$alsubj6[d$edqsub61=="theoretical biology"] <-6
d$alsubj6[d$edqsub61=="biology s level"] <-7
d$alsubj6[d$edqsub61=="buisiness studies"] <-11
d$alsubj6[d$edqsub61=="BUISNESS STUDIES"] <-11
d$alsubj6[d$edqsub61=="BUISNESS STUDIES"] <-11
d$alsubj6[d$edqsub61=="buisness studies"] <-11
d$alsubj6[d$edqsub61=="BUISNESS STUDIES"] <-11
d$alsubj6[d$edqsub61=="business"] <-11
d$alsubj6[d$edqsub61=="Business Studies"] <-11
d$alsubj6[d$edqsub61=="BUSINESS STUDIES BIOLOGY"] <-11
d$alsubj6[d$edqsub61=="Business SudiesInform"] <-11
d$alsubj6[d$edqsub61=="CEMISTERY"] <-12
d$alsubj6[d$edqsub61=="CHE M"] <-12
d$alsubj6[d$edqsub61=="CHEM"] <-12
d$alsubj6[d$edqsub61=="Chem"] <-12
d$alsubj6[d$edqsub61=="chem"] <-12
d$alsubj6[d$edqsub61=="chemestry"] <-12
d$alsubj6[d$edqsub61=="CHEMISRTY"] <-12
d$alsubj6[d$edqsub61=="chemisrty"] <-12
d$alsubj6[d$edqsub61=="CHEMISTERY"] <-12
d$alsubj6[d$edqsub61=="chemistrry"] <-12
d$alsubj6[d$edqsub61=="Chemistry"] <-12
d$alsubj6[d$edqsub61=="CHEMISTRY"] <-12
d$alsubj6[d$edqsub61=="Chemistry - retake"] <-12
d$alsubj6[d$edqsub61=="chemistry (s)"] <-12
d$alsubj6[d$edqsub61=="CHEMISTRY A LEVEL"] <-12
d$alsubj6[d$edqsub61=="chemistyr"] <-12
d$alsubj6[d$edqsub61=="CHEMISTYR"] <-12
d$alsubj6[d$edqsub61=="CHEMSTRY"] <-12
d$alsubj6[d$edqsub61=="CHENISTRY"] <-12
d$alsubj6[d$edqsub61=="Chemistry S level"] <-13
d$alsubj6[d$edqsub61=="chemistry s level"] <-13
d$alsubj6[d$edqsub61=="Chemistry -S level"] <-13
d$alsubj6[d$edqsub61=="s' level chemestry"] <-13
d$alsubj6[d$edqsub61=="Special Chemistry"] <-13
d$alsubj6[d$edqsub61=="clasical civilisation"] <-14
d$alsubj6[d$edqsub61=="clasics"] <-14
d$alsubj6[d$edqsub61=="classical civilations"] <-14
d$alsubj6[d$edqsub61=="classical civilisation"] <-14
d$alsubj6[d$edqsub61=="CLASSICAL CIVILISATION"] <-14
d$alsubj6[d$edqsub61=="CLASSICAL CIVILISATIONS"] <-14
d$alsubj6[d$edqsub61=="CLASSICAL CIVILIZATION"] <-14
d$alsubj6[d$edqsub61=="CLASSICAL STUDIES"] <-14
d$alsubj6[d$edqsub61=="CLASSICS"] <-15
d$alsubj6[d$edqsub61=="COMMUNICATION STUDIES"] <-16
d$alsubj6[d$edqsub61=="communication studies"] <-16
d$alsubj6[d$edqsub61=="COMMUNICATIONS"] <-16
d$alsubj6[d$edqsub61=="COMMUNICATIONS STUDIES"] <-16
d$alsubj6[d$edqsub61=="Communications studies"] <-16
d$alsubj6[d$edqsub61=="applied computer science"] <-17
d$alsubj6[d$edqsub61=="comp studies"] <-17
d$alsubj6[d$edqsub61=="COMPTUTING SKILLS"] <-17
d$alsubj6[d$edqsub61=="COMPUTER PROGRAMMING"] <-17
d$alsubj6[d$edqsub61=="Computer Science"] <-17
d$alsubj6[d$edqsub61=="COMPUTER SCIENCE"] <-17
d$alsubj6[d$edqsub61=="computer science"] <-17
d$alsubj6[d$edqsub61=="computer sciences"] <-17
d$alsubj6[d$edqsub61=="Computer Sciencse"] <-17
d$alsubj6[d$edqsub61=="COMPUTER SICENCE"] <-17
d$alsubj6[d$edqsub61=="Computer Studies"] <-17
d$alsubj6[d$edqsub61=="Computer Studies"] <-17
d$alsubj6[d$edqsub61=="computer studies"] <-17
d$alsubj6[d$edqsub61=="Computer studies"] <-17
d$alsubj6[d$edqsub61=="computing"] <-17
d$alsubj6[d$edqsub61=="Computing"] <-17
d$alsubj6[d$edqsub61=="coputer science"] <-17
d$alsubj6[d$edqsub61=="information Technology"] <-17
d$alsubj6[d$edqsub61=="IT"] <-17
d$alsubj6[d$edqsub61=="Computer science S level"] <-18
d$alsubj6[d$edqsub61=="craft design and technolo"] <-19
d$alsubj6[d$edqsub61=="Design"] <-19
d$alsubj6[d$edqsub61=="design"] <-19
d$alsubj6[d$edqsub61=="DESIGN"] <-19
d$alsubj6[d$edqsub61=="dESIGN & tECHNOLGY"] <-19
d$alsubj6[d$edqsub61=="Design & Technology"] <-19
d$alsubj6[d$edqsub61=="design and technology"] <-19
d$alsubj6[d$edqsub61=="Design and Technology"] <-19
d$alsubj6[d$edqsub61=="design craft and technolo"] <-19
d$alsubj6[d$edqsub61=="design technology"] <-19
d$alsubj6[d$edqsub61=="DESIGN TECHNOLOGY"] <-19
d$alsubj6[d$edqsub61=="c.d.t"] <-19
d$alsubj6[d$edqsub61=="technology"] <-19
d$alsubj6[d$edqsub61=="Technology"] <-19
d$alsubj6[d$edqsub61=="DRAMA"] <-20
d$alsubj6[d$edqsub61=="Drama"] <-20
d$alsubj6[d$edqsub61=="drama and theatre arts"] <-20
d$alsubj6[d$edqsub61=="dance"] <-20
d$alsubj6[d$edqsub61=="Dance and Drama"] <-20
d$alsubj6[d$edqsub61=="ECCONOMICS"] <-21
d$alsubj6[d$edqsub61=="ecomics"] <-21
d$alsubj6[d$edqsub61=="ECOMICS"] <-21
d$alsubj6[d$edqsub61=="ecomincs"] <-21
d$alsubj6[d$edqsub61=="Ecomonics"] <-21
d$alsubj6[d$edqsub61=="ecomopmics"] <-21
d$alsubj6[d$edqsub61=="econ"] <-21
d$alsubj6[d$edqsub61=="ECON"] <-21
d$alsubj6[d$edqsub61=="ECONIICS"] <-21
d$alsubj6[d$edqsub61=="Econimics"] <-21
d$alsubj6[d$edqsub61=="econimics"] <-21
d$alsubj6[d$edqsub61=="Econimins"] <-21
d$alsubj6[d$edqsub61=="Econmics"] <-21
d$alsubj6[d$edqsub61=="econo;mics"] <-21
d$alsubj6[d$edqsub61=="ECONOMIC"] <-21
d$alsubj6[d$edqsub61=="Economic"] <-21
d$alsubj6[d$edqsub61=="economic and social histo"] <-21
d$alsubj6[d$edqsub61=="economices"] <-21
d$alsubj6[d$edqsub61=="economics"] <-21
d$alsubj6[d$edqsub61=="Economics"] <-21
d$alsubj6[d$edqsub61=="ECONOMICS"] <-21
d$alsubj6[d$edqsub61=="economics & politics"] <-21
d$alsubj6[d$edqsub61=="Economics & World Affairs"] <-21
d$alsubj6[d$edqsub61=="economics with politics"] <-21
d$alsubj6[d$edqsub61=="economicse"] <-21
d$alsubj6[d$edqsub61=="economis and world affair"] <-21
d$alsubj6[d$edqsub61=="Ecvonomics"] <-21
d$alsubj6[d$edqsub61=="encominics"] <-21
d$alsubj6[d$edqsub61=="ECONOMICS AT S LEVEL"] <-22
d$alsubj6[d$edqsub61=="Electronic Systems"] <-23
d$alsubj6[d$edqsub61=="ELECTRONIC\S#"] <-23
d$alsubj6[d$edqsub61=="eLECTRONICS"] <-23
d$alsubj6[d$edqsub61=="Electronics"] <-23
d$alsubj6[d$edqsub61=="electronics"] <-23
d$alsubj6[d$edqsub61=="ELECTRONICS"] <-23
d$alsubj6[d$edqsub61=="Electronics"] <-23
d$alsubj6[d$edqsub61=="electronics/statistics"] <-23
d$alsubj6[d$edqsub61=="microelectronics"] <-23
d$alsubj6[d$edqsub61=="ENGINEERING"] <-24
d$alsubj6[d$edqsub61=="ENGINEERING DRAWING"] <-24
d$alsubj6[d$edqsub61=="Engineering Drawing"] <-24
d$alsubj6[d$edqsub61=="Engineering drawing"] <-24
d$alsubj6[d$edqsub61=="engineering drawing"] <-24
d$alsubj6[d$edqsub61=="ENGINEERING DRAWING AND D"] <-24
d$alsubj6[d$edqsub61=="ENGINEERING METALWORK"] <-24
d$alsubj6[d$edqsub61=="ENGINEERING SCIENCE"] <-24
d$alsubj6[d$edqsub61=="Geometric and Engineering"] <-24
d$alsubj6[d$edqsub61=="combined english"] <-25
d$alsubj6[d$edqsub61=="ebglish"] <-25
d$alsubj6[d$edqsub61=="En g Lit"] <-25
d$alsubj6[d$edqsub61=="eng"] <-25
d$alsubj6[d$edqsub61=="ENG"] <-25
d$alsubj6[d$edqsub61=="ENG .LIT"] <-25
d$alsubj6[d$edqsub61=="eng lang"] <-25
d$alsubj6[d$edqsub61=="ENG LANG"] <-25
d$alsubj6[d$edqsub61=="Eng Lang"] <-25
d$alsubj6[d$edqsub61=="eng language/literature"] <-25
d$alsubj6[d$edqsub61=="ENG LIT"] <-25
d$alsubj6[d$edqsub61=="eng lit"] <-25
d$alsubj6[d$edqsub61=="Eng lit"] <-25
d$alsubj6[d$edqsub61=="eng lit."] <-25
d$alsubj6[d$edqsub61=="eng Slevel"] <-25
d$alsubj6[d$edqsub61=="Eng. Lit"] <-25
d$alsubj6[d$edqsub61=="ENG. LIT"] <-25
d$alsubj6[d$edqsub61=="Eng. Lit."] <-25
d$alsubj6[d$edqsub61=="ENG.LIT 1"] <-25
d$alsubj6[d$edqsub61=="eng.lit."] <-25
d$alsubj6[d$edqsub61=="eng/language."] <-25
d$alsubj6[d$edqsub61=="engl"] <-25
d$alsubj6[d$edqsub61=="English"] <-25
d$alsubj6[d$edqsub61=="ENGLISH"] <-25
d$alsubj6[d$edqsub61=="english"] <-25
d$alsubj6[d$edqsub61=="English  lit."] <-25
d$alsubj6[d$edqsub61=="English  lit."] <-25
d$alsubj6[d$edqsub61=="English (Literature)"] <-25
d$alsubj6[d$edqsub61=="ENGLISH ;LITERATURE"] <-25
d$alsubj6[d$edqsub61=="ENGLISH LANG"] <-25
d$alsubj6[d$edqsub61=="english lang"] <-25
d$alsubj6[d$edqsub61=="ENGLISH LANG & LIT"] <-25
d$alsubj6[d$edqsub61=="English Lang and Lit"] <-25
d$alsubj6[d$edqsub61=="English Lang."] <-25
d$alsubj6[d$edqsub61=="english lang.& lit."] <-25
d$alsubj6[d$edqsub61=="English lang/lit"] <-25
d$alsubj6[d$edqsub61=="ENGLISH LANG/LIT"] <-25
d$alsubj6[d$edqsub61=="english language"] <-25
d$alsubj6[d$edqsub61=="English Language"] <-25
d$alsubj6[d$edqsub61=="english language"] <-25
d$alsubj6[d$edqsub61=="ENGLISH LANGUAGE"] <-25
d$alsubj6[d$edqsub61=="English language"] <-25
d$alsubj6[d$edqsub61=="english Language"] <-25
d$alsubj6[d$edqsub61=="English language & Litera"] <-25
d$alsubj6[d$edqsub61=="english language & litera"] <-25
d$alsubj6[d$edqsub61=="ENGLISH LANGUAGE AND LIT"] <-25
d$alsubj6[d$edqsub61=="ENGLISH LANGUAGE AND LITE"] <-25
d$alsubj6[d$edqsub61=="english language/literatu"] <-25
d$alsubj6[d$edqsub61=="english lit"] <-25
d$alsubj6[d$edqsub61=="ENGLISH LIT"] <-25
d$alsubj6[d$edqsub61=="English Lit"] <-25
d$alsubj6[d$edqsub61=="english lit and lang"] <-25
d$alsubj6[d$edqsub61=="ENGLISH LIT AND LANGUAGE"] <-25
d$alsubj6[d$edqsub61=="english lit."] <-25
d$alsubj6[d$edqsub61=="English lit."] <-25
d$alsubj6[d$edqsub61=="ENGLISH LIT."] <-25
d$alsubj6[d$edqsub61=="English lit/lang"] <-25
d$alsubj6[d$edqsub61=="english litand language"] <-25
d$alsubj6[d$edqsub61=="english litature"] <-25
d$alsubj6[d$edqsub61=="ENGLISH LITERATURE"] <-25
d$alsubj6[d$edqsub61=="English Literature"] <-25
d$alsubj6[d$edqsub61=="english literature"] <-25
d$alsubj6[d$edqsub61=="English literature"] <-25
d$alsubj6[d$edqsub61=="English Literature & Lang"] <-25
d$alsubj6[d$edqsub61=="ENGLISH LITERATURE & LANG"] <-25
d$alsubj6[d$edqsub61=="English Literature/Lang."] <-25
d$alsubj6[d$edqsub61=="English Litereature"] <-25
d$alsubj6[d$edqsub61=="ENGLISH LITERTURA"] <-25
d$alsubj6[d$edqsub61=="English Litterature"] <-25
d$alsubj6[d$edqsub61=="english not specific"] <-25
d$alsubj6[d$edqsub61=="ENLISH"] <-25
d$alsubj6[d$edqsub61=="ENLISH LANGUAGE/LITERATUR"] <-25
d$alsubj6[d$edqsub61=="Environmental Sc"] <-62
d$alsubj6[d$edqsub61=="environmental science"] <-62
d$alsubj6[d$edqsub61=="Environmental Studies"] <-62
d$alsubj6[d$edqsub61=="Fashion"] <-52
d$alsubj6[d$edqsub61=="fashion"] <-52
d$alsubj6[d$edqsub61=="Fashion & textiles"] <-52
d$alsubj6[d$edqsub61=="fashion and design"] <-52
d$alsubj6[d$edqsub61=="fashion and fabric"] <-52
d$alsubj6[d$edqsub61=="Fashion design"] <-52
d$alsubj6[d$edqsub61=="film studies"] <-26
d$alsubj6[d$edqsub61=="FILM STUDIES"] <-26 
d$alsubj6[d$edqsub61=="freanch"] <-27
d$alsubj6[d$edqsub61=="frech"	] <-27
d$alsubj6[d$edqsub61=="FRENCH"] <-27
d$alsubj6[d$edqsub61=="french"] <-27
d$alsubj6[d$edqsub61=="French"] <-27
d$alsubj6[d$edqsub61=="french for business"] <-27
d$alsubj6[d$edqsub61=="french lang"] <-27		
d$alsubj6[d$edqsub61=="French Literature"] <-27
d$alsubj6[d$edqsub61=="FRENCH1"] <-27
d$alsubj6[d$edqsub61=="French S level"] <-28
d$alsubj6[d$edqsub61=="Furhther Maths"] <-29
d$alsubj6[d$edqsub61=="further math"] <-29
d$alsubj6[d$edqsub61=="further mathematics"] <-29
d$alsubj6[d$edqsub61=="Further mathematics"] <-29
d$alsubj6[d$edqsub61=="FURTHER MATHEMATICS"] <-29
d$alsubj6[d$edqsub61=="Further Mathematics"] <-29
d$alsubj6[d$edqsub61=="further maths"] <-29
d$alsubj6[d$edqsub61=="Further Maths"] <-29
d$alsubj6[d$edqsub61=="Futher maths"] <-29
d$alsubj6[d$edqsub61=="FURTHER MATHS"] <-29
d$alsubj6[d$edqsub61=="FURTHER MATH"] <-29
d$alsubj6[d$edqsub61=="Further Maths - Pure and"] <-29
d$alsubj6[d$edqsub61=="FURTHER MATHS A LEVEL"] <-29
d$alsubj6[d$edqsub61=="FUTHER MATHS"] <-29
d$alsubj6[d$edqsub61=="further maths (s)"] <-30
d$alsubj6[d$edqsub61=="FURTHER MATHS S LEVEL"] <-30
d$alsubj6[d$edqsub61=="FURTHER MATHS STEP"] <-30
d$alsubj6[d$edqsub61=="S level further maths"] <-30
d$alsubj6[d$edqsub61=="GEN STUD"] <-31
d$alsubj6[d$edqsub61=="gen stud"] <-31
d$alsubj6[d$edqsub61=="gen studies"] <-31
d$alsubj6[d$edqsub61=="GEN STUDIES"] <-31
d$alsubj6[d$edqsub61=="Gen studies"] <-31
d$alsubj6[d$edqsub61=="Gen Studies"] <-31
d$alsubj6[d$edqsub61=="GEN STUDIES RELIGIOUS STU"] <-31
d$alsubj6[d$edqsub61=="gen. studies"] <-31
d$alsubj6[d$edqsub61=="gen.studies"] <-31
d$alsubj6[d$edqsub61=="general"] <-31
d$alsubj6[d$edqsub61=="GENERAL"] <-31
d$alsubj6[d$edqsub61=="general   studies"] <-31
d$alsubj6[d$edqsub61=="general  tudies"] <-31
d$alsubj6[d$edqsub61=="general knowl;edfge"] <-31
d$alsubj6[d$edqsub61=="GENERAL STIUDIES"] <-31
d$alsubj6[d$edqsub61=="GENERAL STUDIES"] <-31
d$alsubj6[d$edqsub61=="general studies"] <-31
d$alsubj6[d$edqsub61=="General studies"] <-31
d$alsubj6[d$edqsub61=="General Studies"] <-31
d$alsubj6[d$edqsub61=="GENERAL STUDY"] <-31
d$alsubj6[d$edqsub61=="general study"] <-31
d$alsubj6[d$edqsub61=="general studys"] <-31
d$alsubj6[d$edqsub61=="Genereal Studies"] <-31
d$alsubj6[d$edqsub61=="genstudies"] <-31
d$alsubj6[d$edqsub61=="1GEOGRAPHY"] <-32
d$alsubj6[d$edqsub61=="gegraphy"] <-32
d$alsubj6[d$edqsub61=="GEGRAPHY"] <-32
d$alsubj6[d$edqsub61=="geoagraphy"] <-32
d$alsubj6[d$edqsub61=="geog"] <-32
d$alsubj6[d$edqsub61=="Geog"] <-32
d$alsubj6[d$edqsub61=="GEOG"] <-32
d$alsubj6[d$edqsub61=="GEOGHRAY"] <-32
d$alsubj6[d$edqsub61=="geogr"] <-32
d$alsubj6[d$edqsub61=="GEOGRAGHY"] <-32
d$alsubj6[d$edqsub61=="GEOGRAHY"] <-32
d$alsubj6[d$edqsub61=="geographt"] <-32
d$alsubj6[d$edqsub61=="GEOGRAPHY"] <-32
d$alsubj6[d$edqsub61=="Geography"] <-32
d$alsubj6[d$edqsub61=="geography"] <-32
d$alsubj6[d$edqsub61=="geography grade d"] <-32
d$alsubj6[d$edqsub61=="geographyy"] <-32
d$alsubj6[d$edqsub61=="geograqphy"] <-32
d$alsubj6[d$edqsub61=="geophraphy"] <-32
d$alsubj6[d$edqsub61=="gepgraphy"] <-32
d$alsubj6[d$edqsub61=="GOEG"] <-32
d$alsubj6[d$edqsub61=="goegraphy"] <-32
d$alsubj6[d$edqsub61=="goegraphy"] <-32
d$alsubj6[d$edqsub61=="geog   s level"] <-33
d$alsubj6[d$edqsub61=="geog s level"] <-33
d$alsubj6[d$edqsub61=="GEOGRAPHY S LEVEL"] <-33
d$alsubj6[d$edqsub61=="geography s level"] <-33
d$alsubj6[d$edqsub61=="geology"] <-34
d$alsubj6[d$edqsub61=="Geology"] <-34
d$alsubj6[d$edqsub61=="GEOLOGY"] <-34
d$alsubj6[d$edqsub61=="German"] <-35
d$alsubj6[d$edqsub61=="german"] <-35
d$alsubj6[d$edqsub61=="GERMAN"] <-35
d$alsubj6[d$edqsub61=="German S level"] <-35
d$alsubj6[d$edqsub61=="German."] <-35
d$alsubj6[d$edqsub61=="gevernment politics"] <-36
d$alsubj6[d$edqsub61=="govenment and politics"] <-36
d$alsubj6[d$edqsub61=="GOVERNMENT"] <-36
d$alsubj6[d$edqsub61=="Government & politics"] <-36
d$alsubj6[d$edqsub61=="GOVERNMENT & POLITICS"] <-36
d$alsubj6[d$edqsub61=="GOVERNMENT & POLITICS"] <-36
d$alsubj6[d$edqsub61=="GOVERNMENT AND POLITICAL"] <-36
d$alsubj6[d$edqsub61=="GOVERNMENT AND POLITICS"] <-36
d$alsubj6[d$edqsub61=="government and politics"] <-36
d$alsubj6[d$edqsub61=="Government and Politics"] <-36
d$alsubj6[d$edqsub61=="GOVERNMENT POLITICS"] <-36
d$alsubj6[d$edqsub61=="governmental politics"] <-36
d$alsubj6[d$edqsub61=="Govrnment and politics"] <-36
d$alsubj6[d$edqsub61=="Govt and politics"] <-36
d$alsubj6[d$edqsub61=="GOVT AND POLITICS"] <-36
d$alsubj6[d$edqsub61=="GOVT. AND POLITICS"] <-36
d$alsubj6[d$edqsub61=="govt/politics"] <-36
d$alsubj6[d$edqsub61=="GRAPHIC \DESIGN"] <-37
d$alsubj6[d$edqsub61=="GRAPHIC DESIGN"] <-37
d$alsubj6[d$edqsub61=="Graphic Design"] <-37
d$alsubj6[d$edqsub61=="graphic design"] <-37
d$alsubj6[d$edqsub61=="graphical communication"] <-37
d$alsubj6[d$edqsub61=="Graphical communication"] <-37
d$alsubj6[d$edqsub61=="gre ke"] <-38
d$alsubj6[d$edqsub61=="GREEK"] <-38
d$alsubj6[d$edqsub61=="greek"] <-38
d$alsubj6[d$edqsub61== "MODERN GREEK"] <-38
d$alsubj6[d$edqsub61==";history"] <-39
d$alsubj6[d$edqsub61=="19 centuary british and e"] <-39
d$alsubj6[d$edqsub61=="American History"] <-39
d$alsubj6[d$edqsub61=="HIDTORY"] <-39
d$alsubj6[d$edqsub61=="hist"] <-39
d$alsubj6[d$edqsub61=="History"] <-39
d$alsubj6[d$edqsub61=="HISTORY"] <-39
d$alsubj6[d$edqsub61=="history"] <-39
d$alsubj6[d$edqsub61=="History (modern)"] <-39
d$alsubj6[d$edqsub61=="History."] <-39
d$alsubj6[d$edqsub61=="Histoy"] <-39
d$alsubj6[d$edqsub61=="histroy"] <-39
d$alsubj6[d$edqsub61=="medeaevil history"] <-39
d$alsubj6[d$edqsub61=="MEDIEVAL HISTORY"] <-39
d$alsubj6[d$edqsub61=="MODERN HISTORY"] <-39
d$alsubj6[d$edqsub61=="Social & Economic History"] <-39
d$alsubj6[d$edqsub61=="Social and economic histo"] <-39
d$alsubj6[d$edqsub61=="HISTORY S LEVEL"] <-40
d$alsubj6[d$edqsub61=="history S level"] <-40
d$alsubj6[d$edqsub61=="hum,an bilogy"] <-62
d$alsubj6[d$edqsub61=="human  biology"] <-62
d$alsubj6[d$edqsub61=="human biology"] <-62
d$alsubj6[d$edqsub61=="Human biology"] <-62
d$alsubj6[d$edqsub61=="Human Biology"] <-62
d$alsubj6[d$edqsub61=="human physiology"] <-62
d$alsubj6[d$edqsub61=="HUMAN BIOLOGY"] <-62
d$alsubj6[d$edqsub61=="HUMAN PHYSIOLOGY"] <-62
d$alsubj6[d$edqsub61=="humanbiology"] <-62
d$alsubj6[d$edqsub61=="humanphysiology"] <-62
d$alsubj6[d$edqsub61=="industrila studies"] <-41
d$alsubj6[d$edqsub61=="Industrial Studies"] <-41
d$alsubj6[d$edqsub61=="Italian"] <-42
d$alsubj6[d$edqsub61=="LATIN"] <-43
d$alsubj6[d$edqsub61=="latin"] <-43
d$alsubj6[d$edqsub61=="Latin"] <-43
d$alsubj6[d$edqsub61=="Latin S level"] <-44
d$alsubj6[d$edqsub61=="latin s level"] <-44
d$alsubj6[d$edqsub61=="LATIN SPECIAL"] <-44
d$alsubj6[d$edqsub61=="English Law."] <-45
d$alsubj6[d$edqsub61=="criminal law"] <-45
d$alsubj6[d$edqsub61=="Law"] <-45
d$alsubj6[d$edqsub61=="law"] <-45
d$alsubj6[d$edqsub61=="LAW"] <-45
d$alsubj6[d$edqsub61=="low"] <-45
d$alsubj6[d$edqsub61=="applied and pure maths"] <-46
d$alsubj6[d$edqsub61=="Applied Mathematics"] <-46
d$alsubj6[d$edqsub61=="applied mathematics"] <-46
d$alsubj6[d$edqsub61=="APPLIED MATHS"] <-46
d$alsubj6[d$edqsub61=="applied maths"] <-46
d$alsubj6[d$edqsub61=="Applied Maths"] <-46
d$alsubj6[d$edqsub61=="combined maths"] <-46
d$alsubj6[d$edqsub61=="Maaths"] <-46
d$alsubj6[d$edqsub61=="Matematics"] <-46
d$alsubj6[d$edqsub61=="MATH"] <-46
d$alsubj6[d$edqsub61=="math"] <-46
d$alsubj6[d$edqsub61=="Math & General knowladge"] <-46
d$alsubj6[d$edqsub61=="Mathematics"] <-46
d$alsubj6[d$edqsub61=="mATHEMATICS"] <-46
d$alsubj6[d$edqsub61=="MATHEMATICS"] <-46
d$alsubj6[d$edqsub61=="mathematics"] <-46
d$alsubj6[d$edqsub61=="MATHEMATICS - PURE/APLIED"] <-46
d$alsubj6[d$edqsub61=="mathematics and art"] <-46
d$alsubj6[d$edqsub61=="Mathematics and Statistic"] <-46
d$alsubj6[d$edqsub61=="Mathematics with stats"] <-46
d$alsubj6[d$edqsub61=="mathematics, pure and app"] <-46
d$alsubj6[d$edqsub61=="MATHMATICS AND STATISTICS"] <-46
d$alsubj6[d$edqsub61=="Maths"] <-46
d$alsubj6[d$edqsub61=="maths"] <-46
d$alsubj6[d$edqsub61=="MATHS"] <-46
d$alsubj6[d$edqsub61=="maths & mechanics"] <-46
d$alsubj6[d$edqsub61=="Maths & Statistics"] <-46
d$alsubj6[d$edqsub61=="maths & statistics"] <-46
d$alsubj6[d$edqsub61=="Maths (pure and Applied)"] <-46
d$alsubj6[d$edqsub61=="Maths /pure and applied"] <-46
d$alsubj6[d$edqsub61=="maths + stats"] <-46
d$alsubj6[d$edqsub61=="MATHS A LEVEL"] <-46
d$alsubj6[d$edqsub61=="maths an"] <-46
d$alsubj6[d$edqsub61=="MATHS AND STATISTICS"] <-46
d$alsubj6[d$edqsub61=="maths and statistics"] <-46
d$alsubj6[d$edqsub61=="Maths and stats"] <-46
d$alsubj6[d$edqsub61=="MATHS AND STATS"] <-46
d$alsubj6[d$edqsub61=="maths AS"] <-46
d$alsubj6[d$edqsub61=="maths pure"] <-46
d$alsubj6[d$edqsub61=="maths pure and applied"] <-46
d$alsubj6[d$edqsub61=="MATHS- PURE AND APPLIED"] <-46
d$alsubj6[d$edqsub61=="Maths pure l& applied"] <-46
d$alsubj6[d$edqsub61=="MATHS S LEVEL"] <-46
d$alsubj6[d$edqsub61=="MATHS WITH STATISTICS"] <-46
d$alsubj6[d$edqsub61=="maths with statistics"] <-46
d$alsubj6[d$edqsub61=="maths with stats"] <-46
d$alsubj6[d$edqsub61=="Maths with stats."] <-46
d$alsubj6[d$edqsub61=="MATHS, PURE AND APPLIED"] <-46
d$alsubj6[d$edqsub61=="maths."] <-46
d$alsubj6[d$edqsub61=="MATHS."] <-46
d$alsubj6[d$edqsub61=="Maths."] <-46
d$alsubj6[d$edqsub61=="Maths/pure and applied"] <-46
d$alsubj6[d$edqsub61=="Maths/Statistics"] <-46
d$alsubj6[d$edqsub61=="MATHSW"] <-46
d$alsubj6[d$edqsub61=="Mathsw"] <-46
d$alsubj6[d$edqsub61=="mechanics"] <-46
d$alsubj6[d$edqsub61=="MMaths"] <-46
d$alsubj6[d$edqsub61=="PURE & APPL MATHS"] <-46
d$alsubj6[d$edqsub61=="Pure & Applied Maths"] <-46
d$alsubj6[d$edqsub61=="pure and applied maths"] <-46
d$alsubj6[d$edqsub61=="PURE AND APPLIED MATHS"] <-46
d$alsubj6[d$edqsub61=="Pure M aths & Statistics"] <-46
d$alsubj6[d$edqsub61=="pure mathematics"] <-46
d$alsubj6[d$edqsub61=="PURE MATHEMATICS"] <-46
d$alsubj6[d$edqsub61=="pure mathematics"] <-46
d$alsubj6[d$edqsub61=="pure maths"] <-46
d$alsubj6[d$edqsub61=="PURE MATHS"] <-46
d$alsubj6[d$edqsub61=="Pure maths"] <-46
d$alsubj6[d$edqsub61=="Pure Maths"] <-46
d$alsubj6[d$edqsub61=="Pure Maths & Mechanics"] <-46
d$alsubj6[d$edqsub61=="Pure Maths & Statistics"] <-46
d$alsubj6[d$edqsub61=="Pure Maths & Stats"] <-46
d$alsubj6[d$edqsub61=="pure maths and statistics"] <-46
d$alsubj6[d$edqsub61=="PURE MATHS AND STATISTICS"] <-46
d$alsubj6[d$edqsub61=="PURE MATHS AND STATS"] <-46
d$alsubj6[d$edqsub61=="pure maths and stats"] <-46
d$alsubj6[d$edqsub61=="PURE MATHS WITH STATISTIC"] <-46
d$alsubj6[d$edqsub61=="pure maths with statistic"] <-46
d$alsubj6[d$edqsub61=="Pure maths with stats"] <-46
d$alsubj6[d$edqsub61=="PURE MATHS WITH STATS"] <-46
d$alsubj6[d$edqsub61=="pure maths with stats."] <-46
d$alsubj6[d$edqsub61=="pure maths witih stats."] <-46
d$alsubj6[d$edqsub61=="pure maths/statistics"] <-46
d$alsubj6[d$edqsub61=="pure/statistal maths"] <-46
d$alsubj6[d$edqsub61=="stastics"] <-46
d$alsubj6[d$edqsub61=="statisics"] <-46
d$alsubj6[d$edqsub61=="STATISTICS"] <-46
d$alsubj6[d$edqsub61=="statistics"] <-46
d$alsubj6[d$edqsub61=="Statistics"] <-46
d$alsubj6[d$edqsub61=="stats"] <-46
d$alsubj6[d$edqsub61=="STATS"] <-46
d$alsubj6[d$edqsub61=="Applied Maths S level"] <-47
d$alsubj6[d$edqsub61=="Maths S/level"] <-46
d$alsubj6[d$edqsub61=="S level maths"] <-46
d$alsubj6[d$edqsub61=="s' level maths"] <-46
d$alsubj6[d$edqsub61=="Step maths"] <-46
d$alsubj6[d$edqsub61=="MEDIA"] <-48
d$alsubj6[d$edqsub61=="Media studies"] <-48
d$alsubj6[d$edqsub61=="music"] <-49
d$alsubj6[d$edqsub61=="Music"] <-49
d$alsubj6[d$edqsub61=="MUSIC"] <-49
d$alsubj6[d$edqsub61=="music practical"] <-49
d$alsubj6[d$edqsub61=="music theory"] <-49
d$alsubj6[d$edqsub61=="Practical music"] <-49
d$alsubj6[d$edqsub61=="Rudiments of Music"] <-49
d$alsubj6[d$edqsub61=="STAGE DECOR AND COSTUME D"] <-50
d$alsubj6[d$edqsub61=="FINANCIAL CONTROL"] <-50
d$alsubj6[d$edqsub61=="ceramics"] <-51
d$alsubj6[d$edqsub61=="CRAFT"] <-51
d$alsubj6[d$edqsub61=="CRAFT DESIGN & THEATRE ST"] <-51
d$alsubj6[d$edqsub61=="POTTERY"] <-51
d$alsubj6[d$edqsub61=="printing"] <-52
d$alsubj6[d$edqsub61=="TEXTILE AND DRESS"] <-52
d$alsubj6[d$edqsub61=="DRESS"] <-52
d$alsubj6[d$edqsub61=="dress and design"] <-52
d$alsubj6[d$edqsub61=="FOOD AND NUTRITION"] <-52
d$alsubj6[d$edqsub61=="food and nutrition"] <-52
d$alsubj6[d$edqsub61=="home econimics"] <-52
d$alsubj6[d$edqsub61=="home economic"] <-52
d$alsubj6[d$edqsub61=="HOME ECONOMICS"] <-52
d$alsubj6[d$edqsub61=="Home Economics"] <-52
d$alsubj6[d$edqsub61=="home economics"] <-52
d$alsubj6[d$edqsub61=="home economics - sewing"] <-52
d$alsubj6[d$edqsub61=="Home economics."] <-52
d$alsubj6[d$edqsub61=="HOME, FAMILY AND SOCIETY"] <-52
d$alsubj6[d$edqsub61=="HOME, FAMILY AND SOCIETY"] <-52
d$alsubj6[d$edqsub61=="CONFECTIONERY TECHNOLOGY"] <-52
d$alsubj6[d$edqsub61=="cookery"] <-52
d$alsubj6[d$edqsub61=="COOKERY"] <-52
d$alsubj6[d$edqsub61=="Domestic Science"] <-52
d$alsubj6[d$edqsub61=="surveying"] <-52
d$alsubj6[d$edqsub61=="tech drawing"] <-52
d$alsubj6[d$edqsub61=="TECH DRAWING"] <-52
d$alsubj6[d$edqsub61=="tech drawing"] <-52
d$alsubj6[d$edqsub61=="TECHNICAL DRAWING"] <-52
d$alsubj6[d$edqsub61=="technical drawing"] <-52
d$alsubj6[d$edqsub61=="Technical DRawing"] <-52
d$alsubj6[d$edqsub61=="technical drawing"] <-52
d$alsubj6[d$edqsub61=="Technical Drawing"] <-52
d$alsubj6[d$edqsub61=="BUILDING CONSTRUCTION"] <-52
d$alsubj6[d$edqsub61=="building construction"] <-52
d$alsubj6[d$edqsub61=="Needlework"] <-52
d$alsubj6[d$edqsub61== "stage craft and design"] <-52
d$alsubj6[d$edqsub61=="SECIENE"] <-62
d$alsubj6[d$edqsub61=="Health Scencie"] <-62
d$alsubj6[d$edqsub61=="HEALTH STUDIES"] <-62
d$alsubj6[d$edqsub61=="Science in Society"] <-62
d$alsubj6[d$edqsub61=="philosophy"] <-54
d$alsubj6[d$edqsub61=="Philosophy"] <-54
d$alsubj6[d$edqsub61=="PHILOSOPHY"] <-54
d$alsubj6[d$edqsub61=="philosphy"] <-54
d$alsubj6[d$edqsub61=="phisics"] <-56
d$alsubj6[d$edqsub61=="PHOTOGRAPHY"] <-55
d$alsubj6[d$edqsub61=="photography"] <-55
d$alsubj6[d$edqsub61=="physical education"] <-68
d$alsubj6[d$edqsub61=="PHYSICAL EDUCATION"] <-68
d$alsubj6[d$edqsub61=="HPYSICS"] <-56
d$alsubj6[d$edqsub61=="PHSICS"] <-56
d$alsubj6[d$edqsub61=="phsics"] <-56
d$alsubj6[d$edqsub61=="phsyics"] <-56
d$alsubj6[d$edqsub61=="phycics"] <-56
d$alsubj6[d$edqsub61=="PHYS"] <-56
d$alsubj6[d$edqsub61=="phys/  maths"] <-56
d$alsubj6[d$edqsub61=="PHYSIC"] <-56
d$alsubj6[d$edqsub61=="PHYSICA"] <-56
d$alsubj6[d$edqsub61=="Physiccs"] <-56
d$alsubj6[d$edqsub61=="Physics"] <-56
d$alsubj6[d$edqsub61=="PHYSICS"] <-56
d$alsubj6[d$edqsub61=="physics"] <-56
d$alsubj6[d$edqsub61=="PHYSICS A LEVEL"] <-56
d$alsubj6[d$edqsub61=="PHYSICS WITH ELECTRONICS"] <-56
d$alsubj6[d$edqsub61=="Physics."] <-56
d$alsubj6[d$edqsub61=="PHYSYCS"] <-56
d$alsubj6[d$edqsub61=="pyschics"] <-56
d$alsubj6[d$edqsub61=="PYSICS"] <-56
d$alsubj6[d$edqsub61=="PHICS"] <-56
d$alsubj6[d$edqsub61=="physics (s)"] <-57
d$alsubj6[d$edqsub61=="Physics S/level"] <-57
d$alsubj6[d$edqsub61=="PHYSICS STEP"] <-57
d$alsubj6[d$edqsub61=="British and American Poli"] <-36
d$alsubj6[d$edqsub61=="BRITISH GOV AND POLITICS"] <-36
d$alsubj6[d$edqsub61=="BRITISH GOVERN AND POLITI"] <-36
d$alsubj6[d$edqsub61=="British government"] <-36
d$alsubj6[d$edqsub61=="british government and po"] <-36
d$alsubj6[d$edqsub61=="British Government l& Pol"] <-36
d$alsubj6[d$edqsub61=="British Govt and politics"] <-36
d$alsubj6[d$edqsub61=="polatics and government"] <-36
d$alsubj6[d$edqsub61=="POLICTICAL HISTORY"] <-36
d$alsubj6[d$edqsub61=="POLITICAL AND ECONOMIC ST"] <-36
d$alsubj6[d$edqsub61=="Political History"] <-36
d$alsubj6[d$edqsub61=="political History"] <-36
d$alsubj6[d$edqsub61=="political history"] <-36
d$alsubj6[d$edqsub61=="political science"] <-36
d$alsubj6[d$edqsub61=="Political Studies"] <-36
d$alsubj6[d$edqsub61=="political studiesd"] <-36
d$alsubj6[d$edqsub61=="politics"] <-36
d$alsubj6[d$edqsub61=="POLITICS"] <-36
d$alsubj6[d$edqsub61=="Politics"] <-36
d$alsubj6[d$edqsub61=="politics & economics"] <-36
d$alsubj6[d$edqsub61=="politics & government"] <-36
d$alsubj6[d$edqsub61=="politics and government"] <-36
d$alsubj6[d$edqsub61=="Politics."] <-36
d$alsubj6[d$edqsub61=="Phsychology"] <-59
d$alsubj6[d$edqsub61=="phsycology"] <-59
d$alsubj6[d$edqsub61=="phychology"] <-59
d$alsubj6[d$edqsub61=="PHYCOLOGY"] <-59
d$alsubj6[d$edqsub61=="phycology"] <-59
d$alsubj6[d$edqsub61=="physchology"] <-59
d$alsubj6[d$edqsub61=="Physchology"] <-59
d$alsubj6[d$edqsub61=="physclogy"] <-59
d$alsubj6[d$edqsub61=="Physco;ogy"] <-59
d$alsubj6[d$edqsub61=="PHYSCOLOGY"] <-59
d$alsubj6[d$edqsub61=="physology"] <-59
d$alsubj6[d$edqsub61=="pschology"] <-59
d$alsubj6[d$edqsub61=="pschology"] <-59
d$alsubj6[d$edqsub61=="pshycoclgy"] <-59
d$alsubj6[d$edqsub61=="PSYCHOLOGY"] <-59
d$alsubj6[d$edqsub61=="psychology"] <-59
d$alsubj6[d$edqsub61=="Psychology"] <-59
d$alsubj6[d$edqsub61=="Psycology"] <-59
d$alsubj6[d$edqsub61=="PSYCOLOGY"] <-59
d$alsubj6[d$edqsub61=="public affairs"] <-36
d$alsubj6[d$edqsub61=="PYSCOLOGY"] <-59
d$alsubj6[d$edqsub61=="Divinity"] <-60
d$alsubj6[d$edqsub61=="DIVINITY"] <-60
d$alsubj6[d$edqsub61=="r.e"] <-60
d$alsubj6[d$edqsub61=="R.E."] <-60
d$alsubj6[d$edqsub61=="R.e."] <-60
d$alsubj6[d$edqsub61=="RE"] <-60
d$alsubj6[d$edqsub61=="re"] <-60
d$alsubj6[d$edqsub61=="REL. STUDIES"] <-60
d$alsubj6[d$edqsub61=="relegious studies"] <-60
d$alsubj6[d$edqsub61=="philosi"] <-54
d$alsubj6[d$edqsub61=="RELIG STUDIES"] <-60
d$alsubj6[d$edqsub61=="religeous studies"] <-60
d$alsubj6[d$edqsub61=="religious education"] <-60
d$alsubj6[d$edqsub61=="Religious Education"] <-60
d$alsubj6[d$edqsub61=="RELIGIOUS EDUCATION"] <-60
d$alsubj6[d$edqsub61=="religious education"] <-60
d$alsubj6[d$edqsub61=="religious knowledge"] <-60
d$alsubj6[d$edqsub61=="religious studies"] <-60
d$alsubj6[d$edqsub61=="RELIGIOUS STUDIES"] <-60
d$alsubj6[d$edqsub61=="Religious studies"] <-60
d$alsubj6[d$edqsub61=="religous"] <-60
d$alsubj6[d$edqsub61=="Religous Education"] <-60
d$alsubj6[d$edqsub61=="scriptire"] <-60
d$alsubj6[d$edqsub61=="theology"] <-60
d$alsubj6[d$edqsub61=="russian"] <-61
d$alsubj6[d$edqsub61=="secretarial"] <-63
d$alsubj6[d$edqsub61=="SECRETARIAL"] <-63
d$alsubj6[d$edqsub61=="SECRETARIAL STUDIES"] <-63
d$alsubj6[d$edqsub61=="Secretarial studies"] <-63
d$alsubj6[d$edqsub61=="SOCIAL BIOLOGY"] <-62
d$alsubj6[d$edqsub61=="social biology"] <-62
d$alsubj6[d$edqsub61=="Social biology"] <-62
d$alsubj6[d$edqsub61=="Social Biology"] <-62
d$alsubj6[d$edqsub61=="SOCIAL POLICY ADMIN"] <-64
d$alsubj6[d$edqsub61=="SOCIAL POLICY"] <-64
d$alsubj6[d$edqsub61=="Social sciences"] <-65
d$alsubj6[d$edqsub61=="social studies"] <-65
d$alsubj6[d$edqsub61=="health and social care"] <-65
d$alsubj6[d$edqsub61=="SOCIALGY"] <-66
d$alsubj6[d$edqsub61=="socialogy"] <-66
d$alsubj6[d$edqsub61=="SOCIALOGY"] <-66
d$alsubj6[d$edqsub61=="Socialolgy"] <-66
d$alsubj6[d$edqsub61=="socialologu"] <-66
d$alsubj6[d$edqsub61=="Socialology"] <-66
d$alsubj6[d$edqsub61=="SOCIOLGY"] <-66
d$alsubj6[d$edqsub61=="socioligy"] <-66
d$alsubj6[d$edqsub61=="sociolocy"] <-66
d$alsubj6[d$edqsub61=="SOCIOLOGOY"] <-66
d$alsubj6[d$edqsub61=="SOCIOLOGY"] <-66
d$alsubj6[d$edqsub61=="Sociology"] <-66
d$alsubj6[d$edqsub61=="sociology"] <-66
d$alsubj6[d$edqsub61=="SOCIOPLOGY"] <-66
d$alsubj6[d$edqsub61=="spanish"] <-67
d$alsubj6[d$edqsub61=="Spanish"] <-67
d$alsubj6[d$edqsub61=="SPANISH"] <-67
d$alsubj6[d$edqsub61=="spannish"] <-67
d$alsubj6[d$edqsub61=="sports studies"] <-68
d$alsubj6[d$edqsub61=="SPORTS STUDIES"] <-68
d$alsubj6[d$edqsub61=="Sports Studies"] <-68
d$alsubj6[d$edqsub61=="theater studies"] <-69
d$alsubj6[d$edqsub61=="Theatre Arts"] <-69
d$alsubj6[d$edqsub61=="THEATRE STUDIEAS"] <-69
d$alsubj6[d$edqsub61=="theatre studies"] <-69
d$alsubj6[d$edqsub61=="Theatre studies"] <-69
d$alsubj6[d$edqsub61=="Theatre Studies"] <-69
d$alsubj6[d$edqsub61=="THEATRE STUDIES"] <-69
d$alsubj6[d$edqsub61=="theatre studys"] <-69
d$alsubj6[d$edqsub61=="theatre stuides"] <-69
d$alsubj6[d$edqsub61=="Urban Studies"] <-51
d$alsubj6[d$edqsub61=="Urdu"] <-70
d$alsubj6[d$edqsub61=="welsh"] <-71
d$alsubj6[d$edqsub61=="WELSH"] <-71
d$alsubj6[d$edqsub61=="war and society"] <-51
d$alsubj6[d$edqsub61=="ZOOLOGY"] <-62
d$alsubj6[d$edqsub61=="zoology"] <-62
d$alsubj6[d$edqsub61=="MANAGEMENT"] <-51
d$alsubj6[d$edqsub61=="modern studies"] <-51
d$alsubj6[d$edqsub61=="MODERN STUDIES"] <-51

# A-level subject 7
d$alsubj7<-NA
d$alsubj7[d$edqsub62=="ACCOUNT AND BUSINESS"] <-1
d$alsubj7[d$edqsub62=="ACCOUNTANCY"] <-1
d$alsubj7[d$edqsub62=="accountancy"] <-1
d$alsubj7[d$edqsub62=="Accountancy"] <-1
d$alsubj7[d$edqsub62=="accountancy"] <-1
d$alsubj7[d$edqsub62=="Accounting"] <-1
d$alsubj7[d$edqsub62=="Accounts"] <-1
d$alsubj7[d$edqsub62=="accounts"] <-1
d$alsubj7[d$edqsub62=="ACCOUNTS"] <-1
d$alsubj7[d$edqsub62=="accounts(business studies"] <-1
d$alsubj7[d$edqsub62=="acounts"] <-1
d$alsubj7[d$edqsub62=="ancient greek"] 		<-2
d$alsubj7[d$edqsub62=="ancient history"] <-3
d$alsubj7[d$edqsub62=="ANCIENT HISTORY"] <-3
d$alsubj7[d$edqsub62=="Ancient History"] <-3
d$alsubj7[d$edqsub62=="ANCIENT HISTORYU"] <-3
d$alsubj7[d$edqsub62=="archaeology"] <-4
d$alsubj7[d$edqsub62=="Archaeology"] <-4
d$alsubj7[d$edqsub62=="2 dimensional art"] <-5
d$alsubj7[d$edqsub62=="art"] <-5
d$alsubj7[d$edqsub62=="3 dimensional art"] <-5
d$alsubj7[d$edqsub62=="Art"] <-5
d$alsubj7[d$edqsub62=="ART"] <-5
d$alsubj7[d$edqsub62=="ARTS"] <-5
d$alsubj7[d$edqsub62=="fine art"] <-5
d$alsubj7[d$edqsub62=="FINE ART"] <-5
d$alsubj7[d$edqsub62=="STUDY OF ART"] <-5
d$alsubj7[d$edqsub62=="Art & Craft"] <-5
d$alsubj7[d$edqsub62=="Art & Design"] <-5
d$alsubj7[d$edqsub62=="art & design technology"] <-5
d$alsubj7[d$edqsub62=="ART 7 DESIGN"] <-5
d$alsubj7[d$edqsub62=="ART AND ART HISTORY"] <-5
d$alsubj7[d$edqsub62=="Art and Art History"] <-5
d$alsubj7[d$edqsub62=="art and crafts"] <-5
d$alsubj7[d$edqsub62=="Art and design"] <-5
d$alsubj7[d$edqsub62=="ART AND DESIGN"] <-5
d$alsubj7[d$edqsub62=="art/design"] <-5
d$alsubj7[d$edqsub62=="art history"] <-5
d$alsubj7[d$edqsub62=="Art History"] <-5
d$alsubj7[d$edqsub62=="art with art history"] <-5
d$alsubj7[d$edqsub62=="ART WITH ART HISTORY"] <-5
d$alsubj7[d$edqsub62=="art/art history"] <-5
d$alsubj7[d$edqsub62=="Art/Art History"] <-5
d$alsubj7[d$edqsub62=="history of aft"] <-5
d$alsubj7[d$edqsub62=="History of art"] <-5
d$alsubj7[d$edqsub62=="History of Art"] <-5
d$alsubj7[d$edqsub62=="bilogy"] <-6
d$alsubj7[d$edqsub62=="biol"] <-6
d$alsubj7[d$edqsub62=="biol;gy"] <-6
d$alsubj7[d$edqsub62=="Biology"] <-6
d$alsubj7[d$edqsub62=="biology"] <-6
d$alsubj7[d$edqsub62=="BIOLOGY"] <-6
d$alsubj7[d$edqsub62=="biology  c"] <-6
d$alsubj7[d$edqsub62=="Biology - retake"] <-6
d$alsubj7[d$edqsub62=="boilogy"] <-6
d$alsubj7[d$edqsub62=="BOTTANY"] <-6
d$alsubj7[d$edqsub62=="practical biology"] <-6
d$alsubj7[d$edqsub62=="theoretical biology"] <-6
d$alsubj7[d$edqsub62=="biology s level"] <-7
d$alsubj7[d$edqsub62=="buisiness studies"] <-11
d$alsubj7[d$edqsub62=="BUISNESS STUDIES"] <-11
d$alsubj7[d$edqsub62=="BUISNESS STUDIES"] <-11
d$alsubj7[d$edqsub62=="buisness studies"] <-11
d$alsubj7[d$edqsub62=="BUISNESS STUDIES"] <-11
d$alsubj7[d$edqsub62=="business"] <-11
d$alsubj7[d$edqsub62=="Business Studies"] <-11
d$alsubj7[d$edqsub62=="BUSINESS STUDIES BIOLOGY"] <-11
d$alsubj7[d$edqsub62=="Business SudiesInform"] <-11
d$alsubj7[d$edqsub62=="CEMISTERY"] <-12
d$alsubj7[d$edqsub62=="CHE M"] <-12
d$alsubj7[d$edqsub62=="CHEM"] <-12
d$alsubj7[d$edqsub62=="Chem"] <-12
d$alsubj7[d$edqsub62=="chem"] <-12
d$alsubj7[d$edqsub62=="chemestry"] <-12
d$alsubj7[d$edqsub62=="CHEMISRTY"] <-12
d$alsubj7[d$edqsub62=="chemisrty"] <-12
d$alsubj7[d$edqsub62=="CHEMISTERY"] <-12
d$alsubj7[d$edqsub62=="chemistrry"] <-12
d$alsubj7[d$edqsub62=="Chemistry"] <-12
d$alsubj7[d$edqsub62=="CHEMISTRY"] <-12
d$alsubj7[d$edqsub62=="Chemistry - retake"] <-12
d$alsubj7[d$edqsub62=="chemistry (s)"] <-12
d$alsubj7[d$edqsub62=="CHEMISTRY A LEVEL"] <-12
d$alsubj7[d$edqsub62=="chemistyr"] <-12
d$alsubj7[d$edqsub62=="CHEMISTYR"] <-12
d$alsubj7[d$edqsub62=="CHEMSTRY"] <-12
d$alsubj7[d$edqsub62=="CHENISTRY"] <-12
d$alsubj7[d$edqsub62=="Chemistry S level"] <-13
d$alsubj7[d$edqsub62=="chemistry s level"] <-13
d$alsubj7[d$edqsub62=="Chemistry -S level"] <-13
d$alsubj7[d$edqsub62=="s' level chemestry"] <-13
d$alsubj7[d$edqsub62=="Special Chemistry"] <-13
d$alsubj7[d$edqsub62=="clasical civilisation"] <-14
d$alsubj7[d$edqsub62=="clasics"] <-14
d$alsubj7[d$edqsub62=="classical civilations"] <-14
d$alsubj7[d$edqsub62=="classical civilisation"] <-14
d$alsubj7[d$edqsub62=="CLASSICAL CIVILISATION"] <-14
d$alsubj7[d$edqsub62=="CLASSICAL CIVILISATIONS"] <-14
d$alsubj7[d$edqsub62=="CLASSICAL CIVILIZATION"] <-14
d$alsubj7[d$edqsub62=="CLASSICAL STUDIES"] <-14
d$alsubj7[d$edqsub62=="CLASSICS"] <-15
d$alsubj7[d$edqsub62=="COMMUNICATION STUDIES"] <-16
d$alsubj7[d$edqsub62=="communication studies"] <-16
d$alsubj7[d$edqsub62=="COMMUNICATIONS"] <-16
d$alsubj7[d$edqsub62=="COMMUNICATIONS STUDIES"] <-16
d$alsubj7[d$edqsub62=="Communications studies"] <-16
d$alsubj7[d$edqsub62=="applied computer science"] <-17
d$alsubj7[d$edqsub62=="comp studies"] <-17
d$alsubj7[d$edqsub62=="COMPTUTING SKILLS"] <-17
d$alsubj7[d$edqsub62=="COMPUTER PROGRAMMING"] <-17
d$alsubj7[d$edqsub62=="Computer Science"] <-17
d$alsubj7[d$edqsub62=="COMPUTER SCIENCE"] <-17
d$alsubj7[d$edqsub62=="computer science"] <-17
d$alsubj7[d$edqsub62=="computer sciences"] <-17
d$alsubj7[d$edqsub62=="Computer Sciencse"] <-17
d$alsubj7[d$edqsub62=="COMPUTER SICENCE"] <-17
d$alsubj7[d$edqsub62=="Computer Studies"] <-17
d$alsubj7[d$edqsub62=="Computer Studies"] <-17
d$alsubj7[d$edqsub62=="computer studies"] <-17
d$alsubj7[d$edqsub62=="Computer studies"] <-17
d$alsubj7[d$edqsub62=="computing"] <-17
d$alsubj7[d$edqsub62=="Computing"] <-17
d$alsubj7[d$edqsub62=="coputer science"] <-17
d$alsubj7[d$edqsub62=="information Technology"] <-17
d$alsubj7[d$edqsub62=="IT"] <-17
d$alsubj7[d$edqsub62=="Computer science S level"] <-18
d$alsubj7[d$edqsub62=="craft design and technolo"] <-19
d$alsubj7[d$edqsub62=="Design"] <-19
d$alsubj7[d$edqsub62=="design"] <-19
d$alsubj7[d$edqsub62=="DESIGN"] <-19
d$alsubj7[d$edqsub62=="dESIGN & tECHNOLGY"] <-19
d$alsubj7[d$edqsub62=="Design & Technology"] <-19
d$alsubj7[d$edqsub62=="design and technology"] <-19
d$alsubj7[d$edqsub62=="Design and Technology"] <-19
d$alsubj7[d$edqsub62=="design craft and technolo"] <-19
d$alsubj7[d$edqsub62=="design technology"] <-19
d$alsubj7[d$edqsub62=="DESIGN TECHNOLOGY"] <-19
d$alsubj7[d$edqsub62=="c.d.t"] <-19
d$alsubj7[d$edqsub62=="technology"] <-19
d$alsubj7[d$edqsub62=="Technology"] <-19
d$alsubj7[d$edqsub62=="DRAMA"] <-20
d$alsubj7[d$edqsub62=="Drama"] <-20
d$alsubj7[d$edqsub62=="drama and theatre arts"] <-20
d$alsubj7[d$edqsub62=="dance"] <-20
d$alsubj7[d$edqsub62=="Dance and Drama"] <-20
d$alsubj7[d$edqsub62=="ECCONOMICS"] <-21
d$alsubj7[d$edqsub62=="ecomics"] <-21
d$alsubj7[d$edqsub62=="ECOMICS"] <-21
d$alsubj7[d$edqsub62=="ecomincs"] <-21
d$alsubj7[d$edqsub62=="Ecomonics"] <-21
d$alsubj7[d$edqsub62=="ecomopmics"] <-21
d$alsubj7[d$edqsub62=="econ"] <-21
d$alsubj7[d$edqsub62=="ECON"] <-21
d$alsubj7[d$edqsub62=="ECONIICS"] <-21
d$alsubj7[d$edqsub62=="Econimics"] <-21
d$alsubj7[d$edqsub62=="econimics"] <-21
d$alsubj7[d$edqsub62=="Econimins"] <-21
d$alsubj7[d$edqsub62=="Econmics"] <-21
d$alsubj7[d$edqsub62=="econo;mics"] <-21
d$alsubj7[d$edqsub62=="ECONOMIC"] <-21
d$alsubj7[d$edqsub62=="Economic"] <-21
d$alsubj7[d$edqsub62=="economic and social histo"] <-21
d$alsubj7[d$edqsub62=="economices"] <-21
d$alsubj7[d$edqsub62=="economics"] <-21
d$alsubj7[d$edqsub62=="Economics"] <-21
d$alsubj7[d$edqsub62=="ECONOMICS"] <-21
d$alsubj7[d$edqsub62=="economics & politics"] <-21
d$alsubj7[d$edqsub62=="Economics & World Affairs"] <-21
d$alsubj7[d$edqsub62=="economics with politics"] <-21
d$alsubj7[d$edqsub62=="economicse"] <-21
d$alsubj7[d$edqsub62=="economis and world affair"] <-21
d$alsubj7[d$edqsub62=="Ecvonomics"] <-21
d$alsubj7[d$edqsub62=="encominics"] <-21
d$alsubj7[d$edqsub62=="ECONOMICS AT S LEVEL"] <-22
d$alsubj7[d$edqsub62=="Electronic Systems"] <-23
d$alsubj7[d$edqsub62=="ELECTRONIC\S#"] <-23
d$alsubj7[d$edqsub62=="eLECTRONICS"] <-23
d$alsubj7[d$edqsub62=="Electronics"] <-23
d$alsubj7[d$edqsub62=="electronics"] <-23
d$alsubj7[d$edqsub62=="ELECTRONICS"] <-23
d$alsubj7[d$edqsub62=="Electronics"] <-23
d$alsubj7[d$edqsub62=="electronics/statistics"] <-23
d$alsubj7[d$edqsub62=="microelectronics"] <-23
d$alsubj7[d$edqsub62=="ENGINEERING"] <-24
d$alsubj7[d$edqsub62=="ENGINEERING DRAWING"] <-24
d$alsubj7[d$edqsub62=="Engineering Drawing"] <-24
d$alsubj7[d$edqsub62=="Engineering drawing"] <-24
d$alsubj7[d$edqsub62=="engineering drawing"] <-24
d$alsubj7[d$edqsub62=="ENGINEERING DRAWING AND D"] <-24
d$alsubj7[d$edqsub62=="ENGINEERING METALWORK"] <-24
d$alsubj7[d$edqsub62=="ENGINEERING SCIENCE"] <-24
d$alsubj7[d$edqsub62=="Geometric and Engineering"] <-24
d$alsubj7[d$edqsub62=="combined english"] <-25
d$alsubj7[d$edqsub62=="ebglish"] <-25
d$alsubj7[d$edqsub62=="En g Lit"] <-25
d$alsubj7[d$edqsub62=="eng"] <-25
d$alsubj7[d$edqsub62=="ENG"] <-25
d$alsubj7[d$edqsub62=="ENG .LIT"] <-25
d$alsubj7[d$edqsub62=="eng lang"] <-25
d$alsubj7[d$edqsub62=="ENG LANG"] <-25
d$alsubj7[d$edqsub62=="Eng Lang"] <-25
d$alsubj7[d$edqsub62=="eng language/literature"] <-25
d$alsubj7[d$edqsub62=="ENG LIT"] <-25
d$alsubj7[d$edqsub62=="eng lit"] <-25
d$alsubj7[d$edqsub62=="Eng lit"] <-25
d$alsubj7[d$edqsub62=="eng lit."] <-25
d$alsubj7[d$edqsub62=="eng Slevel"] <-25
d$alsubj7[d$edqsub62=="Eng. Lit"] <-25
d$alsubj7[d$edqsub62=="ENG. LIT"] <-25
d$alsubj7[d$edqsub62=="Eng. Lit."] <-25
d$alsubj7[d$edqsub62=="ENG.LIT 1"] <-25
d$alsubj7[d$edqsub62=="eng.lit."] <-25
d$alsubj7[d$edqsub62=="eng/language."] <-25
d$alsubj7[d$edqsub62=="engl"] <-25
d$alsubj7[d$edqsub62=="English"] <-25
d$alsubj7[d$edqsub62=="ENGLISH"] <-25
d$alsubj7[d$edqsub62=="english"] <-25
d$alsubj7[d$edqsub62=="English  lit."] <-25
d$alsubj7[d$edqsub62=="English  lit."] <-25
d$alsubj7[d$edqsub62=="English (Literature)"] <-25
d$alsubj7[d$edqsub62=="ENGLISH ;LITERATURE"] <-25
d$alsubj7[d$edqsub62=="ENGLISH LANG"] <-25
d$alsubj7[d$edqsub62=="english lang"] <-25
d$alsubj7[d$edqsub62=="ENGLISH LANG & LIT"] <-25
d$alsubj7[d$edqsub62=="English Lang and Lit"] <-25
d$alsubj7[d$edqsub62=="English Lang."] <-25
d$alsubj7[d$edqsub62=="english lang.& lit."] <-25
d$alsubj7[d$edqsub62=="English lang/lit"] <-25
d$alsubj7[d$edqsub62=="ENGLISH LANG/LIT"] <-25
d$alsubj7[d$edqsub62=="english language"] <-25
d$alsubj7[d$edqsub62=="English Language"] <-25
d$alsubj7[d$edqsub62=="english language"] <-25
d$alsubj7[d$edqsub62=="ENGLISH LANGUAGE"] <-25
d$alsubj7[d$edqsub62=="English language"] <-25
d$alsubj7[d$edqsub62=="english Language"] <-25
d$alsubj7[d$edqsub62=="English language & Litera"] <-25
d$alsubj7[d$edqsub62=="english language & litera"] <-25
d$alsubj7[d$edqsub62=="ENGLISH LANGUAGE AND LIT"] <-25
d$alsubj7[d$edqsub62=="ENGLISH LANGUAGE AND LITE"] <-25
d$alsubj7[d$edqsub62=="english language/literatu"] <-25
d$alsubj7[d$edqsub62=="english lit"] <-25
d$alsubj7[d$edqsub62=="ENGLISH LIT"] <-25
d$alsubj7[d$edqsub62=="English Lit"] <-25
d$alsubj7[d$edqsub62=="english lit and lang"] <-25
d$alsubj7[d$edqsub62=="ENGLISH LIT AND LANGUAGE"] <-25
d$alsubj7[d$edqsub62=="english lit."] <-25
d$alsubj7[d$edqsub62=="English lit."] <-25
d$alsubj7[d$edqsub62=="ENGLISH LIT."] <-25
d$alsubj7[d$edqsub62=="English lit/lang"] <-25
d$alsubj7[d$edqsub62=="english litand language"] <-25
d$alsubj7[d$edqsub62=="english litature"] <-25
d$alsubj7[d$edqsub62=="ENGLISH LITERATURE"] <-25
d$alsubj7[d$edqsub62=="English Literature"] <-25
d$alsubj7[d$edqsub62=="english literature"] <-25
d$alsubj7[d$edqsub62=="English literature"] <-25
d$alsubj7[d$edqsub62=="English Literature & Lang"] <-25
d$alsubj7[d$edqsub62=="ENGLISH LITERATURE & LANG"] <-25
d$alsubj7[d$edqsub62=="English Literature/Lang."] <-25
d$alsubj7[d$edqsub62=="English Litereature"] <-25
d$alsubj7[d$edqsub62=="ENGLISH LITERTURA"] <-25
d$alsubj7[d$edqsub62=="English Litterature"] <-25
d$alsubj7[d$edqsub62=="english not specific"] <-25
d$alsubj7[d$edqsub62=="ENLISH"] <-25
d$alsubj7[d$edqsub62=="ENLISH LANGUAGE/LITERATUR"] <-25
d$alsubj7[d$edqsub62=="Environmental Sc"] <-62
d$alsubj7[d$edqsub62=="environmental science"] <-62
d$alsubj7[d$edqsub62=="Environmental Studies"] <-62
d$alsubj7[d$edqsub62=="Fashion"] <-52
d$alsubj7[d$edqsub62=="fashion"] <-52
d$alsubj7[d$edqsub62=="Fashion & textiles"] <-52
d$alsubj7[d$edqsub62=="fashion and design"] <-52
d$alsubj7[d$edqsub62=="fashion and fabric"] <-52
d$alsubj7[d$edqsub62=="Fashion design"] <-52
d$alsubj7[d$edqsub62=="film studies"] <-26
d$alsubj7[d$edqsub62=="FILM STUDIES"] <-26
d$alsubj7[d$edqsub62=="freanch"] <-27
d$alsubj7[d$edqsub62=="frech"	] <-27
d$alsubj7[d$edqsub62=="FRENCH"] <-27
d$alsubj7[d$edqsub62=="french"] <-27
d$alsubj7[d$edqsub62=="French"] <-27
d$alsubj7[d$edqsub62=="french for business"] <-27
d$alsubj7[d$edqsub62=="french lang"] <-27		
d$alsubj7[d$edqsub62=="French Literature"] <-27
d$alsubj7[d$edqsub62=="FRENCH1"] <-27
d$alsubj7[d$edqsub62=="French S level"] <-28
d$alsubj7[d$edqsub62=="Furhther Maths"] <-29
d$alsubj7[d$edqsub62=="further math"] <-29
d$alsubj7[d$edqsub62=="further mathematics"] <-29
d$alsubj7[d$edqsub62=="Further mathematics"] <-29
d$alsubj7[d$edqsub62=="FURTHER MATHEMATICS"] <-29
d$alsubj7[d$edqsub62=="Further Mathematics"] <-29
d$alsubj7[d$edqsub62=="further maths"] <-29
d$alsubj7[d$edqsub62=="Further Maths"] <-29
d$alsubj7[d$edqsub62=="Futher maths"] <-29
d$alsubj7[d$edqsub62=="FURTHER MATHS"] <-29
d$alsubj7[d$edqsub62=="FURTHER MATH"] <-29
d$alsubj7[d$edqsub62=="Further Maths - Pure and"] <-29
d$alsubj7[d$edqsub62=="FURTHER MATHS A LEVEL"] <-29
d$alsubj7[d$edqsub62=="FUTHER MATHS"] <-29
d$alsubj7[d$edqsub62=="further maths (s)"] <-30
d$alsubj7[d$edqsub62=="FURTHER MATHS S LEVEL"] <-30
d$alsubj7[d$edqsub62=="FURTHER MATHS STEP"] <-30
d$alsubj7[d$edqsub62=="S level further maths"] <-30
d$alsubj7[d$edqsub62=="GEN STUD"] <-31
d$alsubj7[d$edqsub62=="gen stud"] <-31
d$alsubj7[d$edqsub62=="gen studies"] <-31
d$alsubj7[d$edqsub62=="GEN STUDIES"] <-31
d$alsubj7[d$edqsub62=="Gen studies"] <-31
d$alsubj7[d$edqsub62=="Gen Studies"] <-31
d$alsubj7[d$edqsub62=="GEN STUDIES RELIGIOUS STU"] <-31
d$alsubj7[d$edqsub62=="gen. studies"] <-31
d$alsubj7[d$edqsub62=="gen.studies"] <-31
d$alsubj7[d$edqsub62=="general"] <-31
d$alsubj7[d$edqsub62=="GENERAL"] <-31
d$alsubj7[d$edqsub62=="general   studies"] <-31
d$alsubj7[d$edqsub62=="general  tudies"] <-31
d$alsubj7[d$edqsub62=="general knowl;edfge"] <-31
d$alsubj7[d$edqsub62=="GENERAL STIUDIES"] <-31
d$alsubj7[d$edqsub62=="GENERAL STUDIES"] <-31
d$alsubj7[d$edqsub62=="general studies"] <-31
d$alsubj7[d$edqsub62=="General studies"] <-31
d$alsubj7[d$edqsub62=="General Studies"] <-31
d$alsubj7[d$edqsub62=="GENERAL STUDY"] <-31
d$alsubj7[d$edqsub62=="general study"] <-31
d$alsubj7[d$edqsub62=="general studys"] <-31
d$alsubj7[d$edqsub62=="Genereal Studies"] <-31
d$alsubj7[d$edqsub62=="genstudies"] <-31
d$alsubj7[d$edqsub62=="1GEOGRAPHY"] <-32
d$alsubj7[d$edqsub62=="gegraphy"] <-32
d$alsubj7[d$edqsub62=="GEGRAPHY"] <-32
d$alsubj7[d$edqsub62=="geoagraphy"] <-32
d$alsubj7[d$edqsub62=="geog"] <-32
d$alsubj7[d$edqsub62=="Geog"] <-32
d$alsubj7[d$edqsub62=="GEOG"] <-32
d$alsubj7[d$edqsub62=="GEOGHRAY"] <-32
d$alsubj7[d$edqsub62=="geogr"] <-32
d$alsubj7[d$edqsub62=="GEOGRAGHY"] <-32
d$alsubj7[d$edqsub62=="GEOGRAHY"] <-32
d$alsubj7[d$edqsub62=="geographt"] <-32
d$alsubj7[d$edqsub62=="GEOGRAPHY"] <-32
d$alsubj7[d$edqsub62=="Geography"] <-32
d$alsubj7[d$edqsub62=="geography"] <-32
d$alsubj7[d$edqsub62=="geography grade d"] <-32
d$alsubj7[d$edqsub62=="geographyy"] <-32
d$alsubj7[d$edqsub62=="geograqphy"] <-32
d$alsubj7[d$edqsub62=="geophraphy"] <-32
d$alsubj7[d$edqsub62=="gepgraphy"] <-32
d$alsubj7[d$edqsub62=="GOEG"] <-32
d$alsubj7[d$edqsub62=="goegraphy"] <-32
d$alsubj7[d$edqsub62=="goegraphy"] <-32
d$alsubj7[d$edqsub62=="geog   s level"] <-33
d$alsubj7[d$edqsub62=="geog s level"] <-33
d$alsubj7[d$edqsub62=="GEOGRAPHY S LEVEL"] <-33
d$alsubj7[d$edqsub62=="geography s level"] <-33
d$alsubj7[d$edqsub62=="geology"] <-34
d$alsubj7[d$edqsub62=="Geology"] <-34
d$alsubj7[d$edqsub62=="GEOLOGY"] <-34
d$alsubj7[d$edqsub62=="German"] <-35
d$alsubj7[d$edqsub62=="german"] <-35
d$alsubj7[d$edqsub62=="GERMAN"] <-35
d$alsubj7[d$edqsub62=="German S level"] <-35
d$alsubj7[d$edqsub62=="German."] <-35
d$alsubj7[d$edqsub62=="gevernment politics"] <-36
d$alsubj7[d$edqsub62=="govenment and politics"] <-36
d$alsubj7[d$edqsub62=="GOVERNMENT"] <-36
d$alsubj7[d$edqsub62=="Government & politics"] <-36
d$alsubj7[d$edqsub62=="GOVERNMENT & POLITICS"] <-36
d$alsubj7[d$edqsub62=="GOVERNMENT & POLITICS"] <-36
d$alsubj7[d$edqsub62=="GOVERNMENT AND POLITICAL"] <-36
d$alsubj7[d$edqsub62=="GOVERNMENT AND POLITICS"] <-36
d$alsubj7[d$edqsub62=="government and politics"] <-36
d$alsubj7[d$edqsub62=="Government and Politics"] <-36
d$alsubj7[d$edqsub62=="GOVERNMENT POLITICS"] <-36
d$alsubj7[d$edqsub62=="governmental politics"] <-36
d$alsubj7[d$edqsub62=="Govrnment and politics"] <-36
d$alsubj7[d$edqsub62=="Govt and politics"] <-36
d$alsubj7[d$edqsub62=="GOVT AND POLITICS"] <-36
d$alsubj7[d$edqsub62=="GOVT. AND POLITICS"] <-36
d$alsubj7[d$edqsub62=="govt/politics"] <-36
d$alsubj7[d$edqsub62=="GRAPHIC \DESIGN"] <-37
d$alsubj7[d$edqsub62=="GRAPHIC DESIGN"] <-37
d$alsubj7[d$edqsub62=="Graphic Design"] <-37
d$alsubj7[d$edqsub62=="graphic design"] <-37
d$alsubj7[d$edqsub62=="graphical communication"] <-37
d$alsubj7[d$edqsub62=="Graphical communication"] <-37
d$alsubj7[d$edqsub62=="gre ke"] <-38
d$alsubj7[d$edqsub62=="GREEK"] <-38
d$alsubj7[d$edqsub62=="greek"] <-38
d$alsubj7[d$edqsub62== "MODERN GREEK"] <-38
d$alsubj7[d$edqsub62==";history"] <-39
d$alsubj7[d$edqsub62=="19 centuary british and e"] <-39
d$alsubj7[d$edqsub62=="American History"] <-39
d$alsubj7[d$edqsub62=="HIDTORY"] <-39
d$alsubj7[d$edqsub62=="hist"] <-39
d$alsubj7[d$edqsub62=="History"] <-39
d$alsubj7[d$edqsub62=="HISTORY"] <-39
d$alsubj7[d$edqsub62=="history"] <-39
d$alsubj7[d$edqsub62=="History (modern)"] <-39
d$alsubj7[d$edqsub62=="History."] <-39
d$alsubj7[d$edqsub62=="Histoy"] <-39
d$alsubj7[d$edqsub62=="histroy"] <-39
d$alsubj7[d$edqsub62=="medeaevil history"] <-39
d$alsubj7[d$edqsub62=="MEDIEVAL HISTORY"] <-39
d$alsubj7[d$edqsub62=="MODERN HISTORY"] <-39
d$alsubj7[d$edqsub62=="Social & Economic History"] <-39
d$alsubj7[d$edqsub62=="Social and economic histo"] <-39
d$alsubj7[d$edqsub62=="HISTORY S LEVEL"] <-40
d$alsubj7[d$edqsub62=="history S level"] <-40
d$alsubj7[d$edqsub62=="hum,an bilogy"] <-62
d$alsubj7[d$edqsub62=="human  biology"] <-62
d$alsubj7[d$edqsub62=="human biology"] <-62
d$alsubj7[d$edqsub62=="Human biology"] <-62
d$alsubj7[d$edqsub62=="Human Biology"] <-62
d$alsubj7[d$edqsub62=="human physiology"] <-62
d$alsubj7[d$edqsub62=="HUMAN BIOLOGY"] <-62
d$alsubj7[d$edqsub62=="HUMAN PHYSIOLOGY"] <-62
d$alsubj7[d$edqsub62=="humanbiology"] <-62
d$alsubj7[d$edqsub62=="humanphysiology"] <-62
d$alsubj7[d$edqsub62=="industrila studies"] <-41
d$alsubj7[d$edqsub62=="Industrial Studies"] <-41
d$alsubj7[d$edqsub62=="Italian"] <-42
d$alsubj7[d$edqsub62=="LATIN"] <-43
d$alsubj7[d$edqsub62=="latin"] <-43
d$alsubj7[d$edqsub62=="Latin"] <-43
d$alsubj7[d$edqsub62=="Latin S level"] <-44
d$alsubj7[d$edqsub62=="latin s level"] <-44
d$alsubj7[d$edqsub62=="LATIN SPECIAL"] <-44
d$alsubj7[d$edqsub62=="English Law."] <-45
d$alsubj7[d$edqsub62=="criminal law"] <-45
d$alsubj7[d$edqsub62=="Law"] <-45
d$alsubj7[d$edqsub62=="law"] <-45
d$alsubj7[d$edqsub62=="LAW"] <-45
d$alsubj7[d$edqsub62=="low"] <-45
d$alsubj7[d$edqsub62=="applied and pure maths"] <-46
d$alsubj7[d$edqsub62=="Applied Mathematics"] <-46
d$alsubj7[d$edqsub62=="applied mathematics"] <-46
d$alsubj7[d$edqsub62=="APPLIED MATHS"] <-46
d$alsubj7[d$edqsub62=="applied maths"] <-46
d$alsubj7[d$edqsub62=="Applied Maths"] <-46
d$alsubj7[d$edqsub62=="combined maths"] <-46
d$alsubj7[d$edqsub62=="Maaths"] <-46
d$alsubj7[d$edqsub62=="Matematics"] <-46
d$alsubj7[d$edqsub62=="MATH"] <-46
d$alsubj7[d$edqsub62=="math"] <-46
d$alsubj7[d$edqsub62=="Math & General knowladge"] <-46
d$alsubj7[d$edqsub62=="Mathematics"] <-46
d$alsubj7[d$edqsub62=="mATHEMATICS"] <-46
d$alsubj7[d$edqsub62=="MATHEMATICS"] <-46
d$alsubj7[d$edqsub62=="mathematics"] <-46
d$alsubj7[d$edqsub62=="MATHEMATICS - PURE/APLIED"] <-46
d$alsubj7[d$edqsub62=="mathematics and art"] <-46
d$alsubj7[d$edqsub62=="Mathematics and Statistic"] <-46
d$alsubj7[d$edqsub62=="Mathematics with stats"] <-46
d$alsubj7[d$edqsub62=="mathematics, pure and app"] <-46
d$alsubj7[d$edqsub62=="MATHMATICS AND STATISTICS"] <-46
d$alsubj7[d$edqsub62=="Maths"] <-46
d$alsubj7[d$edqsub62=="maths"] <-46
d$alsubj7[d$edqsub62=="MATHS"] <-46
d$alsubj7[d$edqsub62=="maths & mechanics"] <-46
d$alsubj7[d$edqsub62=="Maths & Statistics"] <-46
d$alsubj7[d$edqsub62=="maths & statistics"] <-46
d$alsubj7[d$edqsub62=="Maths (pure and Applied)"] <-46
d$alsubj7[d$edqsub62=="Maths /pure and applied"] <-46
d$alsubj7[d$edqsub62=="maths + stats"] <-46
d$alsubj7[d$edqsub62=="MATHS A LEVEL"] <-46
d$alsubj7[d$edqsub62=="maths an"] <-46
d$alsubj7[d$edqsub62=="MATHS AND STATISTICS"] <-46
d$alsubj7[d$edqsub62=="maths and statistics"] <-46
d$alsubj7[d$edqsub62=="Maths and stats"] <-46
d$alsubj7[d$edqsub62=="MATHS AND STATS"] <-46
d$alsubj7[d$edqsub62=="maths AS"] <-46
d$alsubj7[d$edqsub62=="maths pure"] <-46
d$alsubj7[d$edqsub62=="maths pure and applied"] <-46
d$alsubj7[d$edqsub62=="MATHS- PURE AND APPLIED"] <-46
d$alsubj7[d$edqsub62=="Maths pure l& applied"] <-46
d$alsubj7[d$edqsub62=="MATHS S LEVEL"] <-46
d$alsubj7[d$edqsub62=="MATHS WITH STATISTICS"] <-46
d$alsubj7[d$edqsub62=="maths with statistics"] <-46
d$alsubj7[d$edqsub62=="maths with stats"] <-46
d$alsubj7[d$edqsub62=="Maths with stats."] <-46
d$alsubj7[d$edqsub62=="MATHS, PURE AND APPLIED"] <-46
d$alsubj7[d$edqsub62=="maths."] <-46
d$alsubj7[d$edqsub62=="MATHS."] <-46
d$alsubj7[d$edqsub62=="Maths."] <-46
d$alsubj7[d$edqsub62=="Maths/pure and applied"] <-46
d$alsubj7[d$edqsub62=="Maths/Statistics"] <-46
d$alsubj7[d$edqsub62=="MATHSW"] <-46
d$alsubj7[d$edqsub62=="Mathsw"] <-46
d$alsubj7[d$edqsub62=="mechanics"] <-46
d$alsubj7[d$edqsub62=="MMaths"] <-46
d$alsubj7[d$edqsub62=="PURE & APPL MATHS"] <-46
d$alsubj7[d$edqsub62=="Pure & Applied Maths"] <-46
d$alsubj7[d$edqsub62=="pure and applied maths"] <-46
d$alsubj7[d$edqsub62=="PURE AND APPLIED MATHS"] <-46
d$alsubj7[d$edqsub62=="Pure M aths & Statistics"] <-46
d$alsubj7[d$edqsub62=="pure mathematics"] <-46
d$alsubj7[d$edqsub62=="PURE MATHEMATICS"] <-46
d$alsubj7[d$edqsub62=="pure mathematics"] <-46
d$alsubj7[d$edqsub62=="pure maths"] <-46
d$alsubj7[d$edqsub62=="PURE MATHS"] <-46
d$alsubj7[d$edqsub62=="Pure maths"] <-46
d$alsubj7[d$edqsub62=="Pure Maths"] <-46
d$alsubj7[d$edqsub62=="Pure Maths & Mechanics"] <-46
d$alsubj7[d$edqsub62=="Pure Maths & Statistics"] <-46
d$alsubj7[d$edqsub62=="Pure Maths & Stats"] <-46
d$alsubj7[d$edqsub62=="pure maths and statistics"] <-46
d$alsubj7[d$edqsub62=="PURE MATHS AND STATISTICS"] <-46
d$alsubj7[d$edqsub62=="PURE MATHS AND STATS"] <-46
d$alsubj7[d$edqsub62=="pure maths and stats"] <-46
d$alsubj7[d$edqsub62=="PURE MATHS WITH STATISTIC"] <-46
d$alsubj7[d$edqsub62=="pure maths with statistic"] <-46
d$alsubj7[d$edqsub62=="Pure maths with stats"] <-46
d$alsubj7[d$edqsub62=="PURE MATHS WITH STATS"] <-46
d$alsubj7[d$edqsub62=="pure maths with stats."] <-46
d$alsubj7[d$edqsub62=="pure maths witih stats."] <-46
d$alsubj7[d$edqsub62=="pure maths/statistics"] <-46
d$alsubj7[d$edqsub62=="pure/statistal maths"] <-46
d$alsubj7[d$edqsub62=="stastics"] <-46
d$alsubj7[d$edqsub62=="statisics"] <-46
d$alsubj7[d$edqsub62=="STATISTICS"] <-46
d$alsubj7[d$edqsub62=="statistics"] <-46
d$alsubj7[d$edqsub62=="Statistics"] <-46
d$alsubj7[d$edqsub62=="stats"] <-46
d$alsubj7[d$edqsub62=="STATS"] <-46
d$alsubj7[d$edqsub62=="Applied Maths S level"] <-47
d$alsubj7[d$edqsub62=="Maths S/level"] <-46
d$alsubj7[d$edqsub62=="S level maths"] <-46
d$alsubj7[d$edqsub62=="s' level maths"] <-46
d$alsubj7[d$edqsub62=="Step maths"] <-46
d$alsubj7[d$edqsub62=="MEDIA"] <-48
d$alsubj7[d$edqsub62=="Media studies"] <-48
d$alsubj7[d$edqsub62=="music"] <-49
d$alsubj7[d$edqsub62=="Music"] <-49
d$alsubj7[d$edqsub62=="MUSIC"] <-49
d$alsubj7[d$edqsub62=="music practical"] <-49
d$alsubj7[d$edqsub62=="music theory"] <-49
d$alsubj7[d$edqsub62=="Practical music"] <-49
d$alsubj7[d$edqsub62=="Rudiments of Music"] <-49
d$alsubj7[d$edqsub62=="STAGE DECOR AND COSTUME D"] <-50
d$alsubj7[d$edqsub62=="FINANCIAL CONTROL"] <-50
d$alsubj7[d$edqsub62=="ceramics"] <-51
d$alsubj7[d$edqsub62=="CRAFT"] <-51
d$alsubj7[d$edqsub62=="CRAFT DESIGN & THEATRE ST"] <-51
d$alsubj7[d$edqsub62=="POTTERY"] <-51
d$alsubj7[d$edqsub62=="printing"] <-52
d$alsubj7[d$edqsub62=="TEXTILE AND DRESS"] <-52
d$alsubj7[d$edqsub62=="DRESS"] <-52
d$alsubj7[d$edqsub62=="dress and design"] <-52
d$alsubj7[d$edqsub62=="FOOD AND NUTRITION"] <-52
d$alsubj7[d$edqsub62=="food and nutrition"] <-52
d$alsubj7[d$edqsub62=="home econimics"] <-52
d$alsubj7[d$edqsub62=="home economic"] <-52
d$alsubj7[d$edqsub62=="HOME ECONOMICS"] <-52
d$alsubj7[d$edqsub62=="Home Economics"] <-52
d$alsubj7[d$edqsub62=="home economics"] <-52
d$alsubj7[d$edqsub62=="home economics - sewing"] <-52
d$alsubj7[d$edqsub62=="Home economics."] <-52
d$alsubj7[d$edqsub62=="HOME, FAMILY AND SOCIETY"] <-52
d$alsubj7[d$edqsub62=="HOME, FAMILY AND SOCIETY"] <-52
d$alsubj7[d$edqsub62=="CONFECTIONERY TECHNOLOGY"] <-52
d$alsubj7[d$edqsub62=="cookery"] <-52
d$alsubj7[d$edqsub62=="COOKERY"] <-52
d$alsubj7[d$edqsub62=="Domestic Science"] <-52
d$alsubj7[d$edqsub62=="surveying"] <-52
d$alsubj7[d$edqsub62=="tech drawing"] <-52
d$alsubj7[d$edqsub62=="TECH DRAWING"] <-52
d$alsubj7[d$edqsub62=="tech drawing"] <-52
d$alsubj7[d$edqsub62=="TECHNICAL DRAWING"] <-52
d$alsubj7[d$edqsub62=="technical drawing"] <-52
d$alsubj7[d$edqsub62=="Technical DRawing"] <-52
d$alsubj7[d$edqsub62=="technical drawing"] <-52
d$alsubj7[d$edqsub62=="Technical Drawing"] <-52
d$alsubj7[d$edqsub62=="BUILDING CONSTRUCTION"] <-52
d$alsubj7[d$edqsub62=="building construction"] <-52
d$alsubj7[d$edqsub62=="Needlework"] <-52
d$alsubj7[d$edqsub62== "stage craft and design"] <-52
d$alsubj7[d$edqsub62=="SECIENE"] <-62
d$alsubj7[d$edqsub62=="Health Scencie"] <-62
d$alsubj7[d$edqsub62=="HEALTH STUDIES"] <-62
d$alsubj7[d$edqsub62=="Science in Society"] <-62
d$alsubj7[d$edqsub62=="philosophy"] <-54
d$alsubj7[d$edqsub62=="Philosophy"] <-54
d$alsubj7[d$edqsub62=="PHILOSOPHY"] <-54
d$alsubj7[d$edqsub62=="philosphy"] <-54
d$alsubj7[d$edqsub62=="phisics"] <-56
d$alsubj7[d$edqsub62=="PHOTOGRAPHY"] <-55
d$alsubj7[d$edqsub62=="photography"] <-55
d$alsubj7[d$edqsub62=="physical education"] <-68
d$alsubj7[d$edqsub62=="PHYSICAL EDUCATION"] <-68
d$alsubj7[d$edqsub62=="HPYSICS"] <-56
d$alsubj7[d$edqsub62=="PHSICS"] <-56
d$alsubj7[d$edqsub62=="phsics"] <-56
d$alsubj7[d$edqsub62=="phsyics"] <-56
d$alsubj7[d$edqsub62=="phycics"] <-56
d$alsubj7[d$edqsub62=="PHYS"] <-56
d$alsubj7[d$edqsub62=="phys/  maths"] <-56
d$alsubj7[d$edqsub62=="PHYSIC"] <-56
d$alsubj7[d$edqsub62=="PHYSICA"] <-56
d$alsubj7[d$edqsub62=="Physiccs"] <-56
d$alsubj7[d$edqsub62=="Physics"] <-56
d$alsubj7[d$edqsub62=="PHYSICS"] <-56
d$alsubj7[d$edqsub62=="physics"] <-56
d$alsubj7[d$edqsub62=="PHYSICS A LEVEL"] <-56
d$alsubj7[d$edqsub62=="PHYSICS WITH ELECTRONICS"] <-56
d$alsubj7[d$edqsub62=="Physics."] <-56
d$alsubj7[d$edqsub62=="PHYSYCS"] <-56
d$alsubj7[d$edqsub62=="pyschics"] <-56
d$alsubj7[d$edqsub62=="PYSICS"] <-56
d$alsubj7[d$edqsub62=="PHICS"] <-56
d$alsubj7[d$edqsub62=="physics (s)"] <-57
d$alsubj7[d$edqsub62=="Physics S/level"] <-57
d$alsubj7[d$edqsub62=="PHYSICS STEP"] <-57
d$alsubj7[d$edqsub62=="British and American Poli"] <-36
d$alsubj7[d$edqsub62=="BRITISH GOV AND POLITICS"] <-36
d$alsubj7[d$edqsub62=="BRITISH GOVERN AND POLITI"] <-36
d$alsubj7[d$edqsub62=="British government"] <-36
d$alsubj7[d$edqsub62=="british government and po"] <-36
d$alsubj7[d$edqsub62=="British Government l& Pol"] <-36
d$alsubj7[d$edqsub62=="British Govt and politics"] <-36
d$alsubj7[d$edqsub62=="polatics and government"] <-36
d$alsubj7[d$edqsub62=="POLICTICAL HISTORY"] <-36
d$alsubj7[d$edqsub62=="POLITICAL AND ECONOMIC ST"] <-36
d$alsubj7[d$edqsub62=="Political History"] <-36
d$alsubj7[d$edqsub62=="political History"] <-36
d$alsubj7[d$edqsub62=="political history"] <-36
d$alsubj7[d$edqsub62=="political science"] <-36
d$alsubj7[d$edqsub62=="Political Studies"] <-36
d$alsubj7[d$edqsub62=="political studiesd"] <-36
d$alsubj7[d$edqsub62=="politics"] <-36
d$alsubj7[d$edqsub62=="POLITICS"] <-36
d$alsubj7[d$edqsub62=="Politics"] <-36
d$alsubj7[d$edqsub62=="politics & economics"] <-36
d$alsubj7[d$edqsub62=="politics & government"] <-36
d$alsubj7[d$edqsub62=="politics and government"] <-36
d$alsubj7[d$edqsub62=="Politics."] <-36
d$alsubj7[d$edqsub62=="Phsychology"] <-59
d$alsubj7[d$edqsub62=="phsycology"] <-59
d$alsubj7[d$edqsub62=="phychology"] <-59
d$alsubj7[d$edqsub62=="PHYCOLOGY"] <-59
d$alsubj7[d$edqsub62=="phycology"] <-59
d$alsubj7[d$edqsub62=="physchology"] <-59
d$alsubj7[d$edqsub62=="Physchology"] <-59
d$alsubj7[d$edqsub62=="physclogy"] <-59
d$alsubj7[d$edqsub62=="Physco;ogy"] <-59
d$alsubj7[d$edqsub62=="PHYSCOLOGY"] <-59
d$alsubj7[d$edqsub62=="physology"] <-59
d$alsubj7[d$edqsub62=="pschology"] <-59
d$alsubj7[d$edqsub62=="pschology"] <-59
d$alsubj7[d$edqsub62=="pshycoclgy"] <-59
d$alsubj7[d$edqsub62=="PSYCHOLOGY"] <-59
d$alsubj7[d$edqsub62=="psychology"] <-59
d$alsubj7[d$edqsub62=="Psychology"] <-59
d$alsubj7[d$edqsub62=="Psycology"] <-59
d$alsubj7[d$edqsub62=="PSYCOLOGY"] <-59
d$alsubj7[d$edqsub62=="public affairs"] <-36
d$alsubj7[d$edqsub62=="PYSCOLOGY"] <-59
d$alsubj7[d$edqsub62=="Divinity"] <-60
d$alsubj7[d$edqsub62=="DIVINITY"] <-60
d$alsubj7[d$edqsub62=="r.e"] <-60
d$alsubj7[d$edqsub62=="R.E."] <-60
d$alsubj7[d$edqsub62=="R.e."] <-60
d$alsubj7[d$edqsub62=="RE"] <-60
d$alsubj7[d$edqsub62=="re"] <-60
d$alsubj7[d$edqsub62=="REL. STUDIES"] <-60
d$alsubj7[d$edqsub62=="relegious studies"] <-60
d$alsubj7[d$edqsub62=="philosi"] <-54
d$alsubj7[d$edqsub62=="RELIG STUDIES"] <-60
d$alsubj7[d$edqsub62=="religeous studies"] <-60
d$alsubj7[d$edqsub62=="religious education"] <-60
d$alsubj7[d$edqsub62=="Religious Education"] <-60
d$alsubj7[d$edqsub62=="RELIGIOUS EDUCATION"] <-60
d$alsubj7[d$edqsub62=="religious education"] <-60
d$alsubj7[d$edqsub62=="religious knowledge"] <-60
d$alsubj7[d$edqsub62=="religious studies"] <-60
d$alsubj7[d$edqsub62=="RELIGIOUS STUDIES"] <-60
d$alsubj7[d$edqsub62=="Religious studies"] <-60
d$alsubj7[d$edqsub62=="religous"] <-60
d$alsubj7[d$edqsub62=="Religous Education"] <-60
d$alsubj7[d$edqsub62=="scriptire"] <-60
d$alsubj7[d$edqsub62=="theology"] <-60
d$alsubj7[d$edqsub62=="russian"] <-61
d$alsubj7[d$edqsub62=="secretarial"] <-63
d$alsubj7[d$edqsub62=="SECRETARIAL"] <-63
d$alsubj7[d$edqsub62=="SECRETARIAL STUDIES"] <-63
d$alsubj7[d$edqsub62=="Secretarial studies"] <-63
d$alsubj7[d$edqsub62=="SOCIAL BIOLOGY"] <-62
d$alsubj7[d$edqsub62=="social biology"] <-62
d$alsubj7[d$edqsub62=="Social biology"] <-62
d$alsubj7[d$edqsub62=="Social Biology"] <-62
d$alsubj7[d$edqsub62=="SOCIAL POLICY ADMIN"] <-64
d$alsubj7[d$edqsub62=="SOCIAL POLICY"] <-64
d$alsubj7[d$edqsub62=="Social sciences"] <-65
d$alsubj7[d$edqsub62=="social studies"] <-65
d$alsubj7[d$edqsub62=="health and social care"] <-65
d$alsubj7[d$edqsub62=="SOCIALGY"] <-66
d$alsubj7[d$edqsub62=="socialogy"] <-66
d$alsubj7[d$edqsub62=="SOCIALOGY"] <-66
d$alsubj7[d$edqsub62=="Socialolgy"] <-66
d$alsubj7[d$edqsub62=="socialologu"] <-66
d$alsubj7[d$edqsub62=="Socialology"] <-66
d$alsubj7[d$edqsub62=="SOCIOLGY"] <-66
d$alsubj7[d$edqsub62=="socioligy"] <-66
d$alsubj7[d$edqsub62=="sociolocy"] <-66
d$alsubj7[d$edqsub62=="SOCIOLOGOY"] <-66
d$alsubj7[d$edqsub62=="SOCIOLOGY"] <-66
d$alsubj7[d$edqsub62=="Sociology"] <-66
d$alsubj7[d$edqsub62=="sociology"] <-66
d$alsubj7[d$edqsub62=="SOCIOPLOGY"] <-66
d$alsubj7[d$edqsub62=="spanish"] <-67
d$alsubj7[d$edqsub62=="Spanish"] <-67
d$alsubj7[d$edqsub62=="SPANISH"] <-67
d$alsubj7[d$edqsub62=="spannish"] <-67
d$alsubj7[d$edqsub62=="sports studies"] <-68
d$alsubj7[d$edqsub62=="SPORTS STUDIES"] <-68
d$alsubj7[d$edqsub62=="Sports Studies"] <-68
d$alsubj7[d$edqsub62=="theater studies"] <-69
d$alsubj7[d$edqsub62=="Theatre Arts"] <-69
d$alsubj7[d$edqsub62=="THEATRE STUDIEAS"] <-69
d$alsubj7[d$edqsub62=="theatre studies"] <-69
d$alsubj7[d$edqsub62=="Theatre studies"] <-69
d$alsubj7[d$edqsub62=="Theatre Studies"] <-69
d$alsubj7[d$edqsub62=="THEATRE STUDIES"] <-69
d$alsubj7[d$edqsub62=="theatre studys"] <-69
d$alsubj7[d$edqsub62=="theatre stuides"] <-69
d$alsubj7[d$edqsub62=="Urban Studies"] <-51
d$alsubj7[d$edqsub62=="Urdu"] <-70
d$alsubj7[d$edqsub62=="welsh"] <-71
d$alsubj7[d$edqsub62=="WELSH"] <-71
d$alsubj7[d$edqsub62=="war and society"] <-51
d$alsubj7[d$edqsub62=="ZOOLOGY"] <-62
d$alsubj7[d$edqsub62=="zoology"] <-62
d$alsubj7[d$edqsub62=="MANAGEMENT"] <-51
d$alsubj7[d$edqsub62=="modern studies"] <-51
d$alsubj7[d$edqsub62=="MODERN STUDIES"] <-51

# A-level subject 8
d$alsubj8<-NA
d$alsubj8[d$edqsub63=="ACCOUNT AND BUSINESS"] <-1
d$alsubj8[d$edqsub63=="ACCOUNTANCY"] <-1
d$alsubj8[d$edqsub63=="accountancy"] <-1
d$alsubj8[d$edqsub63=="Accountancy"] <-1
d$alsubj8[d$edqsub63=="accountancy"] <-1
d$alsubj8[d$edqsub63=="Accounting"] <-1
d$alsubj8[d$edqsub63=="Accounts"] <-1
d$alsubj8[d$edqsub63=="accounts"] <-1
d$alsubj8[d$edqsub63=="ACCOUNTS"] <-1
d$alsubj8[d$edqsub63=="accounts(business studies"] <-1
d$alsubj8[d$edqsub63=="acounts"] <-1
d$alsubj8[d$edqsub63=="ancient greek"] 		<-2
d$alsubj8[d$edqsub63=="ancient history"] <-3
d$alsubj8[d$edqsub63=="ANCIENT HISTORY"] <-3
d$alsubj8[d$edqsub63=="Ancient History"] <-3
d$alsubj8[d$edqsub63=="ANCIENT HISTORYU"] <-3
d$alsubj8[d$edqsub63=="archaeology"] <-4
d$alsubj8[d$edqsub63=="Archaeology"] <-4
d$alsubj8[d$edqsub63=="2 dimensional art"] <-5
d$alsubj8[d$edqsub63=="art"] <-5
d$alsubj8[d$edqsub63=="3 dimensional art"] <-5
d$alsubj8[d$edqsub63=="Art"] <-5
d$alsubj8[d$edqsub63=="ART"] <-5
d$alsubj8[d$edqsub63=="ARTS"] <-5
d$alsubj8[d$edqsub63=="fine art"] <-5
d$alsubj8[d$edqsub63=="FINE ART"] <-5
d$alsubj8[d$edqsub63=="STUDY OF ART"] <-5
d$alsubj8[d$edqsub63=="Art & Craft"] <-5
d$alsubj8[d$edqsub63=="Art & Design"] <-5
d$alsubj8[d$edqsub63=="art & design technology"] <-5
d$alsubj8[d$edqsub63=="ART 7 DESIGN"] <-5
d$alsubj8[d$edqsub63=="ART AND ART HISTORY"] <-5
d$alsubj8[d$edqsub63=="Art and Art History"] <-5
d$alsubj8[d$edqsub63=="art and crafts"] <-5
d$alsubj8[d$edqsub63=="Art and design"] <-5
d$alsubj8[d$edqsub63=="ART AND DESIGN"] <-5
d$alsubj8[d$edqsub63=="art/design"] <-5
d$alsubj8[d$edqsub63=="art history"] <-5
d$alsubj8[d$edqsub63=="Art History"] <-5
d$alsubj8[d$edqsub63=="art with art history"] <-5
d$alsubj8[d$edqsub63=="ART WITH ART HISTORY"] <-5
d$alsubj8[d$edqsub63=="art/art history"] <-5
d$alsubj8[d$edqsub63=="Art/Art History"] <-5
d$alsubj8[d$edqsub63=="history of aft"] <-5
d$alsubj8[d$edqsub63=="History of art"] <-5
d$alsubj8[d$edqsub63=="History of Art"] <-5
d$alsubj8[d$edqsub63=="bilogy"] <-6
d$alsubj8[d$edqsub63=="biol"] <-6
d$alsubj8[d$edqsub63=="biol;gy"] <-6
d$alsubj8[d$edqsub63=="Biology"] <-6
d$alsubj8[d$edqsub63=="biology"] <-6
d$alsubj8[d$edqsub63=="BIOLOGY"] <-6
d$alsubj8[d$edqsub63=="biology  c"] <-6
d$alsubj8[d$edqsub63=="Biology - retake"] <-6
d$alsubj8[d$edqsub63=="boilogy"] <-6
d$alsubj8[d$edqsub63=="BOTTANY"] <-6
d$alsubj8[d$edqsub63=="practical biology"] <-6
d$alsubj8[d$edqsub63=="theoretical biology"] <-6
d$alsubj8[d$edqsub63=="biology s level"] <-7
d$alsubj8[d$edqsub63=="buisiness studies"] <-11
d$alsubj8[d$edqsub63=="BUISNESS STUDIES"] <-11
d$alsubj8[d$edqsub63=="BUISNESS STUDIES"] <-11
d$alsubj8[d$edqsub63=="buisness studies"] <-11
d$alsubj8[d$edqsub63=="BUISNESS STUDIES"] <-11
d$alsubj8[d$edqsub63=="business"] <-11
d$alsubj8[d$edqsub63=="Business Studies"] <-11
d$alsubj8[d$edqsub63=="BUSINESS STUDIES BIOLOGY"] <-11
d$alsubj8[d$edqsub63=="Business SudiesInform"] <-11
d$alsubj8[d$edqsub63=="CEMISTERY"] <-12
d$alsubj8[d$edqsub63=="CHE M"] <-12
d$alsubj8[d$edqsub63=="CHEM"] <-12
d$alsubj8[d$edqsub63=="Chem"] <-12
d$alsubj8[d$edqsub63=="chem"] <-12
d$alsubj8[d$edqsub63=="chemestry"] <-12
d$alsubj8[d$edqsub63=="CHEMISRTY"] <-12
d$alsubj8[d$edqsub63=="chemisrty"] <-12
d$alsubj8[d$edqsub63=="CHEMISTERY"] <-12
d$alsubj8[d$edqsub63=="chemistrry"] <-12
d$alsubj8[d$edqsub63=="Chemistry"] <-12
d$alsubj8[d$edqsub63=="CHEMISTRY"] <-12
d$alsubj8[d$edqsub63=="Chemistry - retake"] <-12
d$alsubj8[d$edqsub63=="chemistry (s)"] <-12
d$alsubj8[d$edqsub63=="CHEMISTRY A LEVEL"] <-12
d$alsubj8[d$edqsub63=="chemistyr"] <-12
d$alsubj8[d$edqsub63=="CHEMISTYR"] <-12
d$alsubj8[d$edqsub63=="CHEMSTRY"] <-12
d$alsubj8[d$edqsub63=="CHENISTRY"] <-12
d$alsubj8[d$edqsub63=="Chemistry S level"] <-13
d$alsubj8[d$edqsub63=="chemistry s level"] <-13
d$alsubj8[d$edqsub63=="Chemistry -S level"] <-13
d$alsubj8[d$edqsub63=="s' level chemestry"] <-13
d$alsubj8[d$edqsub63=="Special Chemistry"] <-13
d$alsubj8[d$edqsub63=="clasical civilisation"] <-14
d$alsubj8[d$edqsub63=="clasics"] <-14
d$alsubj8[d$edqsub63=="classical civilations"] <-14
d$alsubj8[d$edqsub63=="classical civilisation"] <-14
d$alsubj8[d$edqsub63=="CLASSICAL CIVILISATION"] <-14
d$alsubj8[d$edqsub63=="CLASSICAL CIVILISATIONS"] <-14
d$alsubj8[d$edqsub63=="CLASSICAL CIVILIZATION"] <-14
d$alsubj8[d$edqsub63=="CLASSICAL STUDIES"] <-14
d$alsubj8[d$edqsub63=="CLASSICS"] <-15
d$alsubj8[d$edqsub63=="COMMUNICATION STUDIES"] <-16
d$alsubj8[d$edqsub63=="communication studies"] <-16
d$alsubj8[d$edqsub63=="COMMUNICATIONS"] <-16
d$alsubj8[d$edqsub63=="COMMUNICATIONS STUDIES"] <-16
d$alsubj8[d$edqsub63=="Communications studies"] <-16
d$alsubj8[d$edqsub63=="applied computer science"] <-17
d$alsubj8[d$edqsub63=="comp studies"] <-17
d$alsubj8[d$edqsub63=="COMPTUTING SKILLS"] <-17
d$alsubj8[d$edqsub63=="COMPUTER PROGRAMMING"] <-17
d$alsubj8[d$edqsub63=="Computer Science"] <-17
d$alsubj8[d$edqsub63=="COMPUTER SCIENCE"] <-17
d$alsubj8[d$edqsub63=="computer science"] <-17
d$alsubj8[d$edqsub63=="computer sciences"] <-17
d$alsubj8[d$edqsub63=="Computer Sciencse"] <-17
d$alsubj8[d$edqsub63=="COMPUTER SICENCE"] <-17
d$alsubj8[d$edqsub63=="Computer Studies"] <-17
d$alsubj8[d$edqsub63=="Computer Studies"] <-17
d$alsubj8[d$edqsub63=="computer studies"] <-17
d$alsubj8[d$edqsub63=="Computer studies"] <-17
d$alsubj8[d$edqsub63=="computing"] <-17
d$alsubj8[d$edqsub63=="Computing"] <-17
d$alsubj8[d$edqsub63=="coputer science"] <-17
d$alsubj8[d$edqsub63=="information Technology"] <-17
d$alsubj8[d$edqsub63=="IT"] <-17
d$alsubj8[d$edqsub63=="Computer science S level"] <-18
d$alsubj8[d$edqsub63=="craft design and technolo"] <-19
d$alsubj8[d$edqsub63=="Design"] <-19
d$alsubj8[d$edqsub63=="design"] <-19
d$alsubj8[d$edqsub63=="DESIGN"] <-19
d$alsubj8[d$edqsub63=="dESIGN & tECHNOLGY"] <-19
d$alsubj8[d$edqsub63=="Design & Technology"] <-19
d$alsubj8[d$edqsub63=="design and technology"] <-19
d$alsubj8[d$edqsub63=="Design and Technology"] <-19
d$alsubj8[d$edqsub63=="design craft and technolo"] <-19
d$alsubj8[d$edqsub63=="design technology"] <-19
d$alsubj8[d$edqsub63=="DESIGN TECHNOLOGY"] <-19
d$alsubj8[d$edqsub63=="c.d.t"] <-19
d$alsubj8[d$edqsub63=="technology"] <-19
d$alsubj8[d$edqsub63=="Technology"] <-19
d$alsubj8[d$edqsub63=="DRAMA"] <-20
d$alsubj8[d$edqsub63=="Drama"] <-20
d$alsubj8[d$edqsub63=="drama and theatre arts"] <-20
d$alsubj8[d$edqsub63=="dance"] <-20
d$alsubj8[d$edqsub63=="Dance and Drama"] <-20
d$alsubj8[d$edqsub63=="ECCONOMICS"] <-21
d$alsubj8[d$edqsub63=="ecomics"] <-21
d$alsubj8[d$edqsub63=="ECOMICS"] <-21
d$alsubj8[d$edqsub63=="ecomincs"] <-21
d$alsubj8[d$edqsub63=="Ecomonics"] <-21
d$alsubj8[d$edqsub63=="ecomopmics"] <-21
d$alsubj8[d$edqsub63=="econ"] <-21
d$alsubj8[d$edqsub63=="ECON"] <-21
d$alsubj8[d$edqsub63=="ECONIICS"] <-21
d$alsubj8[d$edqsub63=="Econimics"] <-21
d$alsubj8[d$edqsub63=="econimics"] <-21
d$alsubj8[d$edqsub63=="Econimins"] <-21
d$alsubj8[d$edqsub63=="Econmics"] <-21
d$alsubj8[d$edqsub63=="econo;mics"] <-21
d$alsubj8[d$edqsub63=="ECONOMIC"] <-21
d$alsubj8[d$edqsub63=="Economic"] <-21
d$alsubj8[d$edqsub63=="economic and social histo"] <-21
d$alsubj8[d$edqsub63=="economices"] <-21
d$alsubj8[d$edqsub63=="economics"] <-21
d$alsubj8[d$edqsub63=="Economics"] <-21
d$alsubj8[d$edqsub63=="ECONOMICS"] <-21
d$alsubj8[d$edqsub63=="economics & politics"] <-21
d$alsubj8[d$edqsub63=="Economics & World Affairs"] <-21
d$alsubj8[d$edqsub63=="economics with politics"] <-21
d$alsubj8[d$edqsub63=="economicse"] <-21
d$alsubj8[d$edqsub63=="economis and world affair"] <-21
d$alsubj8[d$edqsub63=="Ecvonomics"] <-21
d$alsubj8[d$edqsub63=="encominics"] <-21
d$alsubj8[d$edqsub63=="ECONOMICS AT S LEVEL"] <-22
d$alsubj8[d$edqsub63=="Electronic Systems"] <-23
d$alsubj8[d$edqsub63=="ELECTRONIC\S#"] <-23
d$alsubj8[d$edqsub63=="eLECTRONICS"] <-23
d$alsubj8[d$edqsub63=="Electronics"] <-23
d$alsubj8[d$edqsub63=="electronics"] <-23
d$alsubj8[d$edqsub63=="ELECTRONICS"] <-23
d$alsubj8[d$edqsub63=="Electronics"] <-23
d$alsubj8[d$edqsub63=="electronics/statistics"] <-23
d$alsubj8[d$edqsub63=="microelectronics"] <-23
d$alsubj8[d$edqsub63=="ENGINEERING"] <-24
d$alsubj8[d$edqsub63=="ENGINEERING DRAWING"] <-24
d$alsubj8[d$edqsub63=="Engineering Drawing"] <-24
d$alsubj8[d$edqsub63=="Engineering drawing"] <-24
d$alsubj8[d$edqsub63=="engineering drawing"] <-24
d$alsubj8[d$edqsub63=="ENGINEERING DRAWING AND D"] <-24
d$alsubj8[d$edqsub63=="ENGINEERING METALWORK"] <-24
d$alsubj8[d$edqsub63=="ENGINEERING SCIENCE"] <-24
d$alsubj8[d$edqsub63=="Geometric and Engineering"] <-24
d$alsubj8[d$edqsub63=="combined english"] <-25
d$alsubj8[d$edqsub63=="ebglish"] <-25
d$alsubj8[d$edqsub63=="En g Lit"] <-25
d$alsubj8[d$edqsub63=="eng"] <-25
d$alsubj8[d$edqsub63=="ENG"] <-25
d$alsubj8[d$edqsub63=="ENG .LIT"] <-25
d$alsubj8[d$edqsub63=="eng lang"] <-25
d$alsubj8[d$edqsub63=="ENG LANG"] <-25
d$alsubj8[d$edqsub63=="Eng Lang"] <-25
d$alsubj8[d$edqsub63=="eng language/literature"] <-25
d$alsubj8[d$edqsub63=="ENG LIT"] <-25
d$alsubj8[d$edqsub63=="eng lit"] <-25
d$alsubj8[d$edqsub63=="Eng lit"] <-25
d$alsubj8[d$edqsub63=="eng lit."] <-25
d$alsubj8[d$edqsub63=="eng Slevel"] <-25
d$alsubj8[d$edqsub63=="Eng. Lit"] <-25
d$alsubj8[d$edqsub63=="ENG. LIT"] <-25
d$alsubj8[d$edqsub63=="Eng. Lit."] <-25
d$alsubj8[d$edqsub63=="ENG.LIT 1"] <-25
d$alsubj8[d$edqsub63=="eng.lit."] <-25
d$alsubj8[d$edqsub63=="eng/language."] <-25
d$alsubj8[d$edqsub63=="engl"] <-25
d$alsubj8[d$edqsub63=="English"] <-25
d$alsubj8[d$edqsub63=="ENGLISH"] <-25
d$alsubj8[d$edqsub63=="english"] <-25
d$alsubj8[d$edqsub63=="English  lit."] <-25
d$alsubj8[d$edqsub63=="English  lit."] <-25
d$alsubj8[d$edqsub63=="English (Literature)"] <-25
d$alsubj8[d$edqsub63=="ENGLISH ;LITERATURE"] <-25
d$alsubj8[d$edqsub63=="ENGLISH LANG"] <-25
d$alsubj8[d$edqsub63=="english lang"] <-25
d$alsubj8[d$edqsub63=="ENGLISH LANG & LIT"] <-25
d$alsubj8[d$edqsub63=="English Lang and Lit"] <-25
d$alsubj8[d$edqsub63=="English Lang."] <-25
d$alsubj8[d$edqsub63=="english lang.& lit."] <-25
d$alsubj8[d$edqsub63=="English lang/lit"] <-25
d$alsubj8[d$edqsub63=="ENGLISH LANG/LIT"] <-25
d$alsubj8[d$edqsub63=="english language"] <-25
d$alsubj8[d$edqsub63=="English Language"] <-25
d$alsubj8[d$edqsub63=="english language"] <-25
d$alsubj8[d$edqsub63=="ENGLISH LANGUAGE"] <-25
d$alsubj8[d$edqsub63=="English language"] <-25
d$alsubj8[d$edqsub63=="english Language"] <-25
d$alsubj8[d$edqsub63=="English language & Litera"] <-25
d$alsubj8[d$edqsub63=="english language & litera"] <-25
d$alsubj8[d$edqsub63=="ENGLISH LANGUAGE AND LIT"] <-25
d$alsubj8[d$edqsub63=="ENGLISH LANGUAGE AND LITE"] <-25
d$alsubj8[d$edqsub63=="english language/literatu"] <-25
d$alsubj8[d$edqsub63=="english lit"] <-25
d$alsubj8[d$edqsub63=="ENGLISH LIT"] <-25
d$alsubj8[d$edqsub63=="English Lit"] <-25
d$alsubj8[d$edqsub63=="english lit and lang"] <-25
d$alsubj8[d$edqsub63=="ENGLISH LIT AND LANGUAGE"] <-25
d$alsubj8[d$edqsub63=="english lit."] <-25
d$alsubj8[d$edqsub63=="English lit."] <-25
d$alsubj8[d$edqsub63=="ENGLISH LIT."] <-25
d$alsubj8[d$edqsub63=="English lit/lang"] <-25
d$alsubj8[d$edqsub63=="english litand language"] <-25
d$alsubj8[d$edqsub63=="english litature"] <-25
d$alsubj8[d$edqsub63=="ENGLISH LITERATURE"] <-25
d$alsubj8[d$edqsub63=="English Literature"] <-25
d$alsubj8[d$edqsub63=="english literature"] <-25
d$alsubj8[d$edqsub63=="English literature"] <-25
d$alsubj8[d$edqsub63=="English Literature & Lang"] <-25
d$alsubj8[d$edqsub63=="ENGLISH LITERATURE & LANG"] <-25
d$alsubj8[d$edqsub63=="English Literature/Lang."] <-25
d$alsubj8[d$edqsub63=="English Litereature"] <-25
d$alsubj8[d$edqsub63=="ENGLISH LITERTURA"] <-25
d$alsubj8[d$edqsub63=="English Litterature"] <-25
d$alsubj8[d$edqsub63=="english not specific"] <-25
d$alsubj8[d$edqsub63=="ENLISH"] <-25
d$alsubj8[d$edqsub63=="ENLISH LANGUAGE/LITERATUR"] <-25
d$alsubj8[d$edqsub63=="Environmental Sc"] <-62
d$alsubj8[d$edqsub63=="environmental science"] <-62
d$alsubj8[d$edqsub63=="Environmental Studies"] <-62
d$alsubj8[d$edqsub63=="Fashion"] <-52
d$alsubj8[d$edqsub63=="fashion"] <-52
d$alsubj8[d$edqsub63=="Fashion & textiles"] <-52
d$alsubj8[d$edqsub63=="fashion and design"] <-52
d$alsubj8[d$edqsub63=="fashion and fabric"] <-52
d$alsubj8[d$edqsub63=="Fashion design"] <-52
d$alsubj8[d$edqsub63=="film studies"] <-26
d$alsubj8[d$edqsub63=="FILM STUDIES"] <-26
d$alsubj8[d$edqsub63=="freanch"] <-27
d$alsubj8[d$edqsub63=="frech"	] <-27
d$alsubj8[d$edqsub63=="FRENCH"] <-27
d$alsubj8[d$edqsub63=="french"] <-27
d$alsubj8[d$edqsub63=="French"] <-27
d$alsubj8[d$edqsub63=="french for business"] <-27
d$alsubj8[d$edqsub63=="french lang"] <-27		
d$alsubj8[d$edqsub63=="French Literature"] <-27
d$alsubj8[d$edqsub63=="FRENCH1"] <-27
d$alsubj8[d$edqsub63=="French S level"] <-28
d$alsubj8[d$edqsub63=="Furhther Maths"] <-29
d$alsubj8[d$edqsub63=="further math"] <-29
d$alsubj8[d$edqsub63=="further mathematics"] <-29
d$alsubj8[d$edqsub63=="Further mathematics"] <-29
d$alsubj8[d$edqsub63=="FURTHER MATHEMATICS"] <-29
d$alsubj8[d$edqsub63=="Further Mathematics"] <-29
d$alsubj8[d$edqsub63=="further maths"] <-29
d$alsubj8[d$edqsub63=="Further Maths"] <-29
d$alsubj8[d$edqsub63=="Futher maths"] <-29
d$alsubj8[d$edqsub63=="FURTHER MATHS"] <-29
d$alsubj8[d$edqsub63=="FURTHER MATH"] <-29
d$alsubj8[d$edqsub63=="Further Maths - Pure and"] <-29
d$alsubj8[d$edqsub63=="FURTHER MATHS A LEVEL"] <-29
d$alsubj8[d$edqsub63=="FUTHER MATHS"] <-29
d$alsubj8[d$edqsub63=="further maths (s)"] <-30
d$alsubj8[d$edqsub63=="FURTHER MATHS S LEVEL"] <-30
d$alsubj8[d$edqsub63=="FURTHER MATHS STEP"] <-30
d$alsubj8[d$edqsub63=="S level further maths"] <-30
d$alsubj8[d$edqsub63=="GEN STUD"] <-31
d$alsubj8[d$edqsub63=="gen stud"] <-31
d$alsubj8[d$edqsub63=="gen studies"] <-31
d$alsubj8[d$edqsub63=="GEN STUDIES"] <-31
d$alsubj8[d$edqsub63=="Gen studies"] <-31
d$alsubj8[d$edqsub63=="Gen Studies"] <-31
d$alsubj8[d$edqsub63=="GEN STUDIES RELIGIOUS STU"] <-31
d$alsubj8[d$edqsub63=="gen. studies"] <-31
d$alsubj8[d$edqsub63=="gen.studies"] <-31
d$alsubj8[d$edqsub63=="general"] <-31
d$alsubj8[d$edqsub63=="GENERAL"] <-31
d$alsubj8[d$edqsub63=="general   studies"] <-31
d$alsubj8[d$edqsub63=="general  tudies"] <-31
d$alsubj8[d$edqsub63=="general knowl;edfge"] <-31
d$alsubj8[d$edqsub63=="GENERAL STIUDIES"] <-31
d$alsubj8[d$edqsub63=="GENERAL STUDIES"] <-31
d$alsubj8[d$edqsub63=="general studies"] <-31
d$alsubj8[d$edqsub63=="General studies"] <-31
d$alsubj8[d$edqsub63=="General Studies"] <-31
d$alsubj8[d$edqsub63=="GENERAL STUDY"] <-31
d$alsubj8[d$edqsub63=="general study"] <-31
d$alsubj8[d$edqsub63=="general studys"] <-31
d$alsubj8[d$edqsub63=="Genereal Studies"] <-31
d$alsubj8[d$edqsub63=="genstudies"] <-31
d$alsubj8[d$edqsub63=="1GEOGRAPHY"] <-32
d$alsubj8[d$edqsub63=="gegraphy"] <-32
d$alsubj8[d$edqsub63=="GEGRAPHY"] <-32
d$alsubj8[d$edqsub63=="geoagraphy"] <-32
d$alsubj8[d$edqsub63=="geog"] <-32
d$alsubj8[d$edqsub63=="Geog"] <-32
d$alsubj8[d$edqsub63=="GEOG"] <-32
d$alsubj8[d$edqsub63=="GEOGHRAY"] <-32
d$alsubj8[d$edqsub63=="geogr"] <-32
d$alsubj8[d$edqsub63=="GEOGRAGHY"] <-32
d$alsubj8[d$edqsub63=="GEOGRAHY"] <-32
d$alsubj8[d$edqsub63=="geographt"] <-32
d$alsubj8[d$edqsub63=="GEOGRAPHY"] <-32
d$alsubj8[d$edqsub63=="Geography"] <-32
d$alsubj8[d$edqsub63=="geography"] <-32
d$alsubj8[d$edqsub63=="geography grade d"] <-32
d$alsubj8[d$edqsub63=="geographyy"] <-32
d$alsubj8[d$edqsub63=="geograqphy"] <-32
d$alsubj8[d$edqsub63=="geophraphy"] <-32
d$alsubj8[d$edqsub63=="gepgraphy"] <-32
d$alsubj8[d$edqsub63=="GOEG"] <-32
d$alsubj8[d$edqsub63=="goegraphy"] <-32
d$alsubj8[d$edqsub63=="goegraphy"] <-32
d$alsubj8[d$edqsub63=="geog   s level"] <-33
d$alsubj8[d$edqsub63=="geog s level"] <-33
d$alsubj8[d$edqsub63=="GEOGRAPHY S LEVEL"] <-33
d$alsubj8[d$edqsub63=="geography s level"] <-33
d$alsubj8[d$edqsub63=="geology"] <-34
d$alsubj8[d$edqsub63=="Geology"] <-34
d$alsubj8[d$edqsub63=="GEOLOGY"] <-34
d$alsubj8[d$edqsub63=="German"] <-35
d$alsubj8[d$edqsub63=="german"] <-35
d$alsubj8[d$edqsub63=="GERMAN"] <-35
d$alsubj8[d$edqsub63=="German S level"] <-35
d$alsubj8[d$edqsub63=="German."] <-35
d$alsubj8[d$edqsub63=="gevernment politics"] <-36
d$alsubj8[d$edqsub63=="govenment and politics"] <-36
d$alsubj8[d$edqsub63=="GOVERNMENT"] <-36
d$alsubj8[d$edqsub63=="Government & politics"] <-36
d$alsubj8[d$edqsub63=="GOVERNMENT & POLITICS"] <-36
d$alsubj8[d$edqsub63=="GOVERNMENT & POLITICS"] <-36
d$alsubj8[d$edqsub63=="GOVERNMENT AND POLITICAL"] <-36
d$alsubj8[d$edqsub63=="GOVERNMENT AND POLITICS"] <-36
d$alsubj8[d$edqsub63=="government and politics"] <-36
d$alsubj8[d$edqsub63=="Government and Politics"] <-36
d$alsubj8[d$edqsub63=="GOVERNMENT POLITICS"] <-36
d$alsubj8[d$edqsub63=="governmental politics"] <-36
d$alsubj8[d$edqsub63=="Govrnment and politics"] <-36
d$alsubj8[d$edqsub63=="Govt and politics"] <-36
d$alsubj8[d$edqsub63=="GOVT AND POLITICS"] <-36
d$alsubj8[d$edqsub63=="GOVT. AND POLITICS"] <-36
d$alsubj8[d$edqsub63=="govt/politics"] <-36
d$alsubj8[d$edqsub63=="GRAPHIC \DESIGN"] <-37
d$alsubj8[d$edqsub63=="GRAPHIC DESIGN"] <-37
d$alsubj8[d$edqsub63=="Graphic Design"] <-37
d$alsubj8[d$edqsub63=="graphic design"] <-37
d$alsubj8[d$edqsub63=="graphical communication"] <-37
d$alsubj8[d$edqsub63=="Graphical communication"] <-37
d$alsubj8[d$edqsub63=="gre ke"] <-38
d$alsubj8[d$edqsub63=="GREEK"] <-38
d$alsubj8[d$edqsub63=="greek"] <-38
d$alsubj8[d$edqsub63== "MODERN GREEK"] <-38
d$alsubj8[d$edqsub63==";history"] <-39
d$alsubj8[d$edqsub63=="19 centuary british and e"] <-39
d$alsubj8[d$edqsub63=="American History"] <-39
d$alsubj8[d$edqsub63=="HIDTORY"] <-39
d$alsubj8[d$edqsub63=="hist"] <-39
d$alsubj8[d$edqsub63=="History"] <-39
d$alsubj8[d$edqsub63=="HISTORY"] <-39
d$alsubj8[d$edqsub63=="history"] <-39
d$alsubj8[d$edqsub63=="History (modern)"] <-39
d$alsubj8[d$edqsub63=="History."] <-39
d$alsubj8[d$edqsub63=="Histoy"] <-39
d$alsubj8[d$edqsub63=="histroy"] <-39
d$alsubj8[d$edqsub63=="medeaevil history"] <-39
d$alsubj8[d$edqsub63=="MEDIEVAL HISTORY"] <-39
d$alsubj8[d$edqsub63=="MODERN HISTORY"] <-39
d$alsubj8[d$edqsub63=="Social & Economic History"] <-39
d$alsubj8[d$edqsub63=="Social and economic histo"] <-39
d$alsubj8[d$edqsub63=="HISTORY S LEVEL"] <-40
d$alsubj8[d$edqsub63=="history S level"] <-40
d$alsubj8[d$edqsub63=="hum,an bilogy"] <-62
d$alsubj8[d$edqsub63=="human  biology"] <-62
d$alsubj8[d$edqsub63=="human biology"] <-62
d$alsubj8[d$edqsub63=="Human biology"] <-62
d$alsubj8[d$edqsub63=="Human Biology"] <-62
d$alsubj8[d$edqsub63=="human physiology"] <-62
d$alsubj8[d$edqsub63=="HUMAN BIOLOGY"] <-62
d$alsubj8[d$edqsub63=="HUMAN PHYSIOLOGY"] <-62
d$alsubj8[d$edqsub63=="humanbiology"] <-62
d$alsubj8[d$edqsub63=="humanphysiology"] <-62
d$alsubj8[d$edqsub63=="industrila studies"] <-41
d$alsubj8[d$edqsub63=="Industrial Studies"] <-41
d$alsubj8[d$edqsub63=="Italian"] <-42
d$alsubj8[d$edqsub63=="LATIN"] <-43
d$alsubj8[d$edqsub63=="latin"] <-43
d$alsubj8[d$edqsub63=="Latin"] <-43
d$alsubj8[d$edqsub63=="Latin S level"] <-44
d$alsubj8[d$edqsub63=="latin s level"] <-44
d$alsubj8[d$edqsub63=="LATIN SPECIAL"] <-44
d$alsubj8[d$edqsub63=="English Law."] <-45
d$alsubj8[d$edqsub63=="criminal law"] <-45
d$alsubj8[d$edqsub63=="Law"] <-45
d$alsubj8[d$edqsub63=="law"] <-45
d$alsubj8[d$edqsub63=="LAW"] <-45
d$alsubj8[d$edqsub63=="low"] <-45
d$alsubj8[d$edqsub63=="applied and pure maths"] <-46
d$alsubj8[d$edqsub63=="Applied Mathematics"] <-46
d$alsubj8[d$edqsub63=="applied mathematics"] <-46
d$alsubj8[d$edqsub63=="APPLIED MATHS"] <-46
d$alsubj8[d$edqsub63=="applied maths"] <-46
d$alsubj8[d$edqsub63=="Applied Maths"] <-46
d$alsubj8[d$edqsub63=="combined maths"] <-46
d$alsubj8[d$edqsub63=="Maaths"] <-46
d$alsubj8[d$edqsub63=="Matematics"] <-46
d$alsubj8[d$edqsub63=="MATH"] <-46
d$alsubj8[d$edqsub63=="math"] <-46
d$alsubj8[d$edqsub63=="Math & General knowladge"] <-46
d$alsubj8[d$edqsub63=="Mathematics"] <-46
d$alsubj8[d$edqsub63=="mATHEMATICS"] <-46
d$alsubj8[d$edqsub63=="MATHEMATICS"] <-46
d$alsubj8[d$edqsub63=="mathematics"] <-46
d$alsubj8[d$edqsub63=="MATHEMATICS - PURE/APLIED"] <-46
d$alsubj8[d$edqsub63=="mathematics and art"] <-46
d$alsubj8[d$edqsub63=="Mathematics and Statistic"] <-46
d$alsubj8[d$edqsub63=="Mathematics with stats"] <-46
d$alsubj8[d$edqsub63=="mathematics, pure and app"] <-46
d$alsubj8[d$edqsub63=="MATHMATICS AND STATISTICS"] <-46
d$alsubj8[d$edqsub63=="Maths"] <-46
d$alsubj8[d$edqsub63=="maths"] <-46
d$alsubj8[d$edqsub63=="MATHS"] <-46
d$alsubj8[d$edqsub63=="maths & mechanics"] <-46
d$alsubj8[d$edqsub63=="Maths & Statistics"] <-46
d$alsubj8[d$edqsub63=="maths & statistics"] <-46
d$alsubj8[d$edqsub63=="Maths (pure and Applied)"] <-46
d$alsubj8[d$edqsub63=="Maths /pure and applied"] <-46
d$alsubj8[d$edqsub63=="maths + stats"] <-46
d$alsubj8[d$edqsub63=="MATHS A LEVEL"] <-46
d$alsubj8[d$edqsub63=="maths an"] <-46
d$alsubj8[d$edqsub63=="MATHS AND STATISTICS"] <-46
d$alsubj8[d$edqsub63=="maths and statistics"] <-46
d$alsubj8[d$edqsub63=="Maths and stats"] <-46
d$alsubj8[d$edqsub63=="MATHS AND STATS"] <-46
d$alsubj8[d$edqsub63=="maths AS"] <-46
d$alsubj8[d$edqsub63=="maths pure"] <-46
d$alsubj8[d$edqsub63=="maths pure and applied"] <-46
d$alsubj8[d$edqsub63=="MATHS- PURE AND APPLIED"] <-46
d$alsubj8[d$edqsub63=="Maths pure l& applied"] <-46
d$alsubj8[d$edqsub63=="MATHS S LEVEL"] <-46
d$alsubj8[d$edqsub63=="MATHS WITH STATISTICS"] <-46
d$alsubj8[d$edqsub63=="maths with statistics"] <-46
d$alsubj8[d$edqsub63=="maths with stats"] <-46
d$alsubj8[d$edqsub63=="Maths with stats."] <-46
d$alsubj8[d$edqsub63=="MATHS, PURE AND APPLIED"] <-46
d$alsubj8[d$edqsub63=="maths."] <-46
d$alsubj8[d$edqsub63=="MATHS."] <-46
d$alsubj8[d$edqsub63=="Maths."] <-46
d$alsubj8[d$edqsub63=="Maths/pure and applied"] <-46
d$alsubj8[d$edqsub63=="Maths/Statistics"] <-46
d$alsubj8[d$edqsub63=="MATHSW"] <-46
d$alsubj8[d$edqsub63=="Mathsw"] <-46
d$alsubj8[d$edqsub63=="mechanics"] <-46
d$alsubj8[d$edqsub63=="MMaths"] <-46
d$alsubj8[d$edqsub63=="PURE & APPL MATHS"] <-46
d$alsubj8[d$edqsub63=="Pure & Applied Maths"] <-46
d$alsubj8[d$edqsub63=="pure and applied maths"] <-46
d$alsubj8[d$edqsub63=="PURE AND APPLIED MATHS"] <-46
d$alsubj8[d$edqsub63=="Pure M aths & Statistics"] <-46
d$alsubj8[d$edqsub63=="pure mathematics"] <-46
d$alsubj8[d$edqsub63=="PURE MATHEMATICS"] <-46
d$alsubj8[d$edqsub63=="pure mathematics"] <-46
d$alsubj8[d$edqsub63=="pure maths"] <-46
d$alsubj8[d$edqsub63=="PURE MATHS"] <-46
d$alsubj8[d$edqsub63=="Pure maths"] <-46
d$alsubj8[d$edqsub63=="Pure Maths"] <-46
d$alsubj8[d$edqsub63=="Pure Maths & Mechanics"] <-46
d$alsubj8[d$edqsub63=="Pure Maths & Statistics"] <-46
d$alsubj8[d$edqsub63=="Pure Maths & Stats"] <-46
d$alsubj8[d$edqsub63=="pure maths and statistics"] <-46
d$alsubj8[d$edqsub63=="PURE MATHS AND STATISTICS"] <-46
d$alsubj8[d$edqsub63=="PURE MATHS AND STATS"] <-46
d$alsubj8[d$edqsub63=="pure maths and stats"] <-46
d$alsubj8[d$edqsub63=="PURE MATHS WITH STATISTIC"] <-46
d$alsubj8[d$edqsub63=="pure maths with statistic"] <-46
d$alsubj8[d$edqsub63=="Pure maths with stats"] <-46
d$alsubj8[d$edqsub63=="PURE MATHS WITH STATS"] <-46
d$alsubj8[d$edqsub63=="pure maths with stats."] <-46
d$alsubj8[d$edqsub63=="pure maths witih stats."] <-46
d$alsubj8[d$edqsub63=="pure maths/statistics"] <-46
d$alsubj8[d$edqsub63=="pure/statistal maths"] <-46
d$alsubj8[d$edqsub63=="stastics"] <-46
d$alsubj8[d$edqsub63=="statisics"] <-46
d$alsubj8[d$edqsub63=="STATISTICS"] <-46
d$alsubj8[d$edqsub63=="statistics"] <-46
d$alsubj8[d$edqsub63=="Statistics"] <-46
d$alsubj8[d$edqsub63=="stats"] <-46
d$alsubj8[d$edqsub63=="STATS"] <-46
d$alsubj8[d$edqsub63=="Applied Maths S level"] <-47
d$alsubj8[d$edqsub63=="Maths S/level"] <-46
d$alsubj8[d$edqsub63=="S level maths"] <-46
d$alsubj8[d$edqsub63=="s' level maths"] <-46
d$alsubj8[d$edqsub63=="Step maths"] <-46
d$alsubj8[d$edqsub63=="MEDIA"] <-48
d$alsubj8[d$edqsub63=="Media studies"] <-48
d$alsubj8[d$edqsub63=="music"] <-49
d$alsubj8[d$edqsub63=="Music"] <-49
d$alsubj8[d$edqsub63=="MUSIC"] <-49
d$alsubj8[d$edqsub63=="music practical"] <-49
d$alsubj8[d$edqsub63=="music theory"] <-49
d$alsubj8[d$edqsub63=="Practical music"] <-49
d$alsubj8[d$edqsub63=="Rudiments of Music"] <-49
d$alsubj8[d$edqsub63=="STAGE DECOR AND COSTUME D"] <-50
d$alsubj8[d$edqsub63=="FINANCIAL CONTROL"] <-50
d$alsubj8[d$edqsub63=="ceramics"] <-51
d$alsubj8[d$edqsub63=="CRAFT"] <-51
d$alsubj8[d$edqsub63=="CRAFT DESIGN & THEATRE ST"] <-51
d$alsubj8[d$edqsub63=="POTTERY"] <-51
d$alsubj8[d$edqsub63=="printing"] <-52
d$alsubj8[d$edqsub63=="TEXTILE AND DRESS"] <-52
d$alsubj8[d$edqsub63=="DRESS"] <-52
d$alsubj8[d$edqsub63=="dress and design"] <-52
d$alsubj8[d$edqsub63=="FOOD AND NUTRITION"] <-52
d$alsubj8[d$edqsub63=="food and nutrition"] <-52
d$alsubj8[d$edqsub63=="home econimics"] <-52
d$alsubj8[d$edqsub63=="home economic"] <-52
d$alsubj8[d$edqsub63=="HOME ECONOMICS"] <-52
d$alsubj8[d$edqsub63=="Home Economics"] <-52
d$alsubj8[d$edqsub63=="home economics"] <-52
d$alsubj8[d$edqsub63=="home economics - sewing"] <-52
d$alsubj8[d$edqsub63=="Home economics."] <-52
d$alsubj8[d$edqsub63=="HOME, FAMILY AND SOCIETY"] <-52
d$alsubj8[d$edqsub63=="HOME, FAMILY AND SOCIETY"] <-52
d$alsubj8[d$edqsub63=="CONFECTIONERY TECHNOLOGY"] <-52
d$alsubj8[d$edqsub63=="cookery"] <-52
d$alsubj8[d$edqsub63=="COOKERY"] <-52
d$alsubj8[d$edqsub63=="Domestic Science"] <-52
d$alsubj8[d$edqsub63=="surveying"] <-52
d$alsubj8[d$edqsub63=="tech drawing"] <-52
d$alsubj8[d$edqsub63=="TECH DRAWING"] <-52
d$alsubj8[d$edqsub63=="tech drawing"] <-52
d$alsubj8[d$edqsub63=="TECHNICAL DRAWING"] <-52
d$alsubj8[d$edqsub63=="technical drawing"] <-52
d$alsubj8[d$edqsub63=="Technical DRawing"] <-52
d$alsubj8[d$edqsub63=="technical drawing"] <-52
d$alsubj8[d$edqsub63=="Technical Drawing"] <-52
d$alsubj8[d$edqsub63=="BUILDING CONSTRUCTION"] <-52
d$alsubj8[d$edqsub63=="building construction"] <-52
d$alsubj8[d$edqsub63=="Needlework"] <-52
d$alsubj8[d$edqsub63== "stage craft and design"] <-52
d$alsubj8[d$edqsub63=="SECIENE"] <-62
d$alsubj8[d$edqsub63=="Health Scencie"] <-62
d$alsubj8[d$edqsub63=="HEALTH STUDIES"] <-62
d$alsubj8[d$edqsub63=="Science in Society"] <-62
d$alsubj8[d$edqsub63=="philosophy"] <-54
d$alsubj8[d$edqsub63=="Philosophy"] <-54
d$alsubj8[d$edqsub63=="PHILOSOPHY"] <-54
d$alsubj8[d$edqsub63=="philosphy"] <-54
d$alsubj8[d$edqsub63=="phisics"] <-56
d$alsubj8[d$edqsub63=="PHOTOGRAPHY"] <-55
d$alsubj8[d$edqsub63=="photography"] <-55
d$alsubj8[d$edqsub63=="physical education"] <-68
d$alsubj8[d$edqsub63=="PHYSICAL EDUCATION"] <-68
d$alsubj8[d$edqsub63=="HPYSICS"] <-56
d$alsubj8[d$edqsub63=="PHSICS"] <-56
d$alsubj8[d$edqsub63=="phsics"] <-56
d$alsubj8[d$edqsub63=="phsyics"] <-56
d$alsubj8[d$edqsub63=="phycics"] <-56
d$alsubj8[d$edqsub63=="PHYS"] <-56
d$alsubj8[d$edqsub63=="phys/  maths"] <-56
d$alsubj8[d$edqsub63=="PHYSIC"] <-56
d$alsubj8[d$edqsub63=="PHYSICA"] <-56
d$alsubj8[d$edqsub63=="Physiccs"] <-56
d$alsubj8[d$edqsub63=="Physics"] <-56
d$alsubj8[d$edqsub63=="PHYSICS"] <-56
d$alsubj8[d$edqsub63=="physics"] <-56
d$alsubj8[d$edqsub63=="PHYSICS A LEVEL"] <-56
d$alsubj8[d$edqsub63=="PHYSICS WITH ELECTRONICS"] <-56
d$alsubj8[d$edqsub63=="Physics."] <-56
d$alsubj8[d$edqsub63=="PHYSYCS"] <-56
d$alsubj8[d$edqsub63=="pyschics"] <-56
d$alsubj8[d$edqsub63=="PYSICS"] <-56
d$alsubj8[d$edqsub63=="PHICS"] <-56
d$alsubj8[d$edqsub63=="physics (s)"] <-57
d$alsubj8[d$edqsub63=="Physics S/level"] <-57
d$alsubj8[d$edqsub63=="PHYSICS STEP"] <-57
d$alsubj8[d$edqsub63=="British and American Poli"] <-36
d$alsubj8[d$edqsub63=="BRITISH GOV AND POLITICS"] <-36
d$alsubj8[d$edqsub63=="BRITISH GOVERN AND POLITI"] <-36
d$alsubj8[d$edqsub63=="British government"] <-36
d$alsubj8[d$edqsub63=="british government and po"] <-36
d$alsubj8[d$edqsub63=="British Government l& Pol"] <-36
d$alsubj8[d$edqsub63=="British Govt and politics"] <-36
d$alsubj8[d$edqsub63=="polatics and government"] <-36
d$alsubj8[d$edqsub63=="POLICTICAL HISTORY"] <-36
d$alsubj8[d$edqsub63=="POLITICAL AND ECONOMIC ST"] <-36
d$alsubj8[d$edqsub63=="Political History"] <-36
d$alsubj8[d$edqsub63=="political History"] <-36
d$alsubj8[d$edqsub63=="political history"] <-36
d$alsubj8[d$edqsub63=="political science"] <-36
d$alsubj8[d$edqsub63=="Political Studies"] <-36
d$alsubj8[d$edqsub63=="political studiesd"] <-36
d$alsubj8[d$edqsub63=="politics"] <-36
d$alsubj8[d$edqsub63=="POLITICS"] <-36
d$alsubj8[d$edqsub63=="Politics"] <-36
d$alsubj8[d$edqsub63=="politics & economics"] <-36
d$alsubj8[d$edqsub63=="politics & government"] <-36
d$alsubj8[d$edqsub63=="politics and government"] <-36
d$alsubj8[d$edqsub63=="Politics."] <-36
d$alsubj8[d$edqsub63=="Phsychology"] <-59
d$alsubj8[d$edqsub63=="phsycology"] <-59
d$alsubj8[d$edqsub63=="phychology"] <-59
d$alsubj8[d$edqsub63=="PHYCOLOGY"] <-59
d$alsubj8[d$edqsub63=="phycology"] <-59
d$alsubj8[d$edqsub63=="physchology"] <-59
d$alsubj8[d$edqsub63=="Physchology"] <-59
d$alsubj8[d$edqsub63=="physclogy"] <-59
d$alsubj8[d$edqsub63=="Physco;ogy"] <-59
d$alsubj8[d$edqsub63=="PHYSCOLOGY"] <-59
d$alsubj8[d$edqsub63=="physology"] <-59
d$alsubj8[d$edqsub63=="pschology"] <-59
d$alsubj8[d$edqsub63=="pschology"] <-59
d$alsubj8[d$edqsub63=="pshycoclgy"] <-59
d$alsubj8[d$edqsub63=="PSYCHOLOGY"] <-59
d$alsubj8[d$edqsub63=="psychology"] <-59
d$alsubj8[d$edqsub63=="Psychology"] <-59
d$alsubj8[d$edqsub63=="Psycology"] <-59
d$alsubj8[d$edqsub63=="PSYCOLOGY"] <-59
d$alsubj8[d$edqsub63=="public affairs"] <-36
d$alsubj8[d$edqsub63=="PYSCOLOGY"] <-59
d$alsubj8[d$edqsub63=="Divinity"] <-60
d$alsubj8[d$edqsub63=="DIVINITY"] <-60
d$alsubj8[d$edqsub63=="r.e"] <-60
d$alsubj8[d$edqsub63=="R.E."] <-60
d$alsubj8[d$edqsub63=="R.e."] <-60
d$alsubj8[d$edqsub63=="RE"] <-60
d$alsubj8[d$edqsub63=="re"] <-60
d$alsubj8[d$edqsub63=="REL. STUDIES"] <-60
d$alsubj8[d$edqsub63=="relegious studies"] <-60
d$alsubj8[d$edqsub63=="philosi"] <-54
d$alsubj8[d$edqsub63=="RELIG STUDIES"] <-60
d$alsubj8[d$edqsub63=="religeous studies"] <-60
d$alsubj8[d$edqsub63=="religious education"] <-60
d$alsubj8[d$edqsub63=="Religious Education"] <-60
d$alsubj8[d$edqsub63=="RELIGIOUS EDUCATION"] <-60
d$alsubj8[d$edqsub63=="religious education"] <-60
d$alsubj8[d$edqsub63=="religious knowledge"] <-60
d$alsubj8[d$edqsub63=="religious studies"] <-60
d$alsubj8[d$edqsub63=="RELIGIOUS STUDIES"] <-60
d$alsubj8[d$edqsub63=="Religious studies"] <-60
d$alsubj8[d$edqsub63=="religous"] <-60
d$alsubj8[d$edqsub63=="Religous Education"] <-60
d$alsubj8[d$edqsub63=="scriptire"] <-60
d$alsubj8[d$edqsub63=="theology"] <-60
d$alsubj8[d$edqsub63=="russian"] <-61
d$alsubj8[d$edqsub63=="secretarial"] <-63
d$alsubj8[d$edqsub63=="SECRETARIAL"] <-63
d$alsubj8[d$edqsub63=="SECRETARIAL STUDIES"] <-63
d$alsubj8[d$edqsub63=="Secretarial studies"] <-63
d$alsubj8[d$edqsub63=="SOCIAL BIOLOGY"] <-62
d$alsubj8[d$edqsub63=="social biology"] <-62
d$alsubj8[d$edqsub63=="Social biology"] <-62
d$alsubj8[d$edqsub63=="Social Biology"] <-62
d$alsubj8[d$edqsub63=="SOCIAL POLICY ADMIN"] <-64
d$alsubj8[d$edqsub63=="SOCIAL POLICY"] <-64
d$alsubj8[d$edqsub63=="Social sciences"] <-65
d$alsubj8[d$edqsub63=="social studies"] <-65
d$alsubj8[d$edqsub63=="health and social care"] <-65
d$alsubj8[d$edqsub63=="SOCIALGY"] <-66
d$alsubj8[d$edqsub63=="socialogy"] <-66
d$alsubj8[d$edqsub63=="SOCIALOGY"] <-66
d$alsubj8[d$edqsub63=="Socialolgy"] <-66
d$alsubj8[d$edqsub63=="socialologu"] <-66
d$alsubj8[d$edqsub63=="Socialology"] <-66
d$alsubj8[d$edqsub63=="SOCIOLGY"] <-66
d$alsubj8[d$edqsub63=="socioligy"] <-66
d$alsubj8[d$edqsub63=="sociolocy"] <-66
d$alsubj8[d$edqsub63=="SOCIOLOGOY"] <-66
d$alsubj8[d$edqsub63=="SOCIOLOGY"] <-66
d$alsubj8[d$edqsub63=="Sociology"] <-66
d$alsubj8[d$edqsub63=="sociology"] <-66
d$alsubj8[d$edqsub63=="SOCIOPLOGY"] <-66
d$alsubj8[d$edqsub63=="spanish"] <-67
d$alsubj8[d$edqsub63=="Spanish"] <-67
d$alsubj8[d$edqsub63=="SPANISH"] <-67
d$alsubj8[d$edqsub63=="spannish"] <-67
d$alsubj8[d$edqsub63=="sports studies"] <-68
d$alsubj8[d$edqsub63=="SPORTS STUDIES"] <-68
d$alsubj8[d$edqsub63=="Sports Studies"] <-68
d$alsubj8[d$edqsub63=="theater studies"] <-69
d$alsubj8[d$edqsub63=="Theatre Arts"] <-69
d$alsubj8[d$edqsub63=="THEATRE STUDIEAS"] <-69
d$alsubj8[d$edqsub63=="theatre studies"] <-69
d$alsubj8[d$edqsub63=="Theatre studies"] <-69
d$alsubj8[d$edqsub63=="Theatre Studies"] <-69
d$alsubj8[d$edqsub63=="THEATRE STUDIES"] <-69
d$alsubj8[d$edqsub63=="theatre studys"] <-69
d$alsubj8[d$edqsub63=="theatre stuides"] <-69
d$alsubj8[d$edqsub63=="Urban Studies"] <-51
d$alsubj8[d$edqsub63=="Urdu"] <-70
d$alsubj8[d$edqsub63=="welsh"] <-71
d$alsubj8[d$edqsub63=="WELSH"] <-71
d$alsubj8[d$edqsub63=="war and society"] <-51
d$alsubj8[d$edqsub63=="ZOOLOGY"] <-62
d$alsubj8[d$edqsub63=="zoology"] <-62
d$alsubj8[d$edqsub63=="MANAGEMENT"] <-51
d$alsubj8[d$edqsub63=="modern studies"] <-51
d$alsubj8[d$edqsub63=="MODERN STUDIES"] <-51

# A-level subject 9
d$alsubj9<-NA
d$alsubj9[d$edqsub64=="ACCOUNT AND BUSINESS"] <-1
d$alsubj9[d$edqsub64=="ACCOUNTANCY"] <-1
d$alsubj9[d$edqsub64=="accountancy"] <-1
d$alsubj9[d$edqsub64=="Accountancy"] <-1
d$alsubj9[d$edqsub64=="accountancy"] <-1
d$alsubj9[d$edqsub64=="Accounting"] <-1
d$alsubj9[d$edqsub64=="Accounts"] <-1
d$alsubj9[d$edqsub64=="accounts"] <-1
d$alsubj9[d$edqsub64=="ACCOUNTS"] <-1
d$alsubj9[d$edqsub64=="accounts(business studies"] <-1
d$alsubj9[d$edqsub64=="acounts"] <-1
d$alsubj9[d$edqsub64=="ancient greek"] 		<-2
d$alsubj9[d$edqsub64=="ancient history"] <-3
d$alsubj9[d$edqsub64=="ANCIENT HISTORY"] <-3
d$alsubj9[d$edqsub64=="Ancient History"] <-3
d$alsubj9[d$edqsub64=="ANCIENT HISTORYU"] <-3
d$alsubj9[d$edqsub64=="archaeology"] <-4
d$alsubj9[d$edqsub64=="Archaeology"] <-4
d$alsubj9[d$edqsub64=="2 dimensional art"] <-5
d$alsubj9[d$edqsub64=="art"] <-5
d$alsubj9[d$edqsub64=="3 dimensional art"] <-5
d$alsubj9[d$edqsub64=="Art"] <-5
d$alsubj9[d$edqsub64=="ART"] <-5
d$alsubj9[d$edqsub64=="ARTS"] <-5
d$alsubj9[d$edqsub64=="fine art"] <-5
d$alsubj9[d$edqsub64=="FINE ART"] <-5
d$alsubj9[d$edqsub64=="STUDY OF ART"] <-5
d$alsubj9[d$edqsub64=="Art & Craft"] <-5
d$alsubj9[d$edqsub64=="Art & Design"] <-5
d$alsubj9[d$edqsub64=="art & design technology"] <-5
d$alsubj9[d$edqsub64=="ART 7 DESIGN"] <-5
d$alsubj9[d$edqsub64=="ART AND ART HISTORY"] <-5
d$alsubj9[d$edqsub64=="Art and Art History"] <-5
d$alsubj9[d$edqsub64=="art and crafts"] <-5
d$alsubj9[d$edqsub64=="Art and design"] <-5
d$alsubj9[d$edqsub64=="ART AND DESIGN"] <-5
d$alsubj9[d$edqsub64=="art/design"] <-5
d$alsubj9[d$edqsub64=="art history"] <-5
d$alsubj9[d$edqsub64=="Art History"] <-5
d$alsubj9[d$edqsub64=="art with art history"] <-5
d$alsubj9[d$edqsub64=="ART WITH ART HISTORY"] <-5
d$alsubj9[d$edqsub64=="art/art history"] <-5
d$alsubj9[d$edqsub64=="Art/Art History"] <-5
d$alsubj9[d$edqsub64=="history of aft"] <-5
d$alsubj9[d$edqsub64=="History of art"] <-5
d$alsubj9[d$edqsub64=="History of Art"] <-5
d$alsubj9[d$edqsub64=="bilogy"] <-6
d$alsubj9[d$edqsub64=="biol"] <-6
d$alsubj9[d$edqsub64=="biol;gy"] <-6
d$alsubj9[d$edqsub64=="Biology"] <-6
d$alsubj9[d$edqsub64=="biology"] <-6
d$alsubj9[d$edqsub64=="BIOLOGY"] <-6
d$alsubj9[d$edqsub64=="biology  c"] <-6
d$alsubj9[d$edqsub64=="Biology - retake"] <-6
d$alsubj9[d$edqsub64=="boilogy"] <-6
d$alsubj9[d$edqsub64=="BOTTANY"] <-6
d$alsubj9[d$edqsub64=="practical biology"] <-6
d$alsubj9[d$edqsub64=="theoretical biology"] <-6
d$alsubj9[d$edqsub64=="biology s level"] <-7
d$alsubj9[d$edqsub64=="buisiness studies"] <-11
d$alsubj9[d$edqsub64=="BUISNESS STUDIES"] <-11
d$alsubj9[d$edqsub64=="BUISNESS STUDIES"] <-11
d$alsubj9[d$edqsub64=="buisness studies"] <-11
d$alsubj9[d$edqsub64=="BUISNESS STUDIES"] <-11
d$alsubj9[d$edqsub64=="business"] <-11
d$alsubj9[d$edqsub64=="Business Studies"] <-11
d$alsubj9[d$edqsub64=="BUSINESS STUDIES BIOLOGY"] <-11
d$alsubj9[d$edqsub64=="Business SudiesInform"] <-11
d$alsubj9[d$edqsub64=="CEMISTERY"] <-12
d$alsubj9[d$edqsub64=="CHE M"] <-12
d$alsubj9[d$edqsub64=="CHEM"] <-12
d$alsubj9[d$edqsub64=="Chem"] <-12
d$alsubj9[d$edqsub64=="chem"] <-12
d$alsubj9[d$edqsub64=="chemestry"] <-12
d$alsubj9[d$edqsub64=="CHEMISRTY"] <-12
d$alsubj9[d$edqsub64=="chemisrty"] <-12
d$alsubj9[d$edqsub64=="CHEMISTERY"] <-12
d$alsubj9[d$edqsub64=="chemistrry"] <-12
d$alsubj9[d$edqsub64=="Chemistry"] <-12
d$alsubj9[d$edqsub64=="CHEMISTRY"] <-12
d$alsubj9[d$edqsub64=="Chemistry - retake"] <-12
d$alsubj9[d$edqsub64=="chemistry (s)"] <-12
d$alsubj9[d$edqsub64=="CHEMISTRY A LEVEL"] <-12
d$alsubj9[d$edqsub64=="chemistyr"] <-12
d$alsubj9[d$edqsub64=="CHEMISTYR"] <-12
d$alsubj9[d$edqsub64=="CHEMSTRY"] <-12
d$alsubj9[d$edqsub64=="CHENISTRY"] <-12
d$alsubj9[d$edqsub64=="Chemistry S level"] <-13
d$alsubj9[d$edqsub64=="chemistry s level"] <-13
d$alsubj9[d$edqsub64=="Chemistry -S level"] <-13
d$alsubj9[d$edqsub64=="s' level chemestry"] <-13
d$alsubj9[d$edqsub64=="Special Chemistry"] <-13
d$alsubj9[d$edqsub64=="clasical civilisation"] <-14
d$alsubj9[d$edqsub64=="clasics"] <-14
d$alsubj9[d$edqsub64=="classical civilations"] <-14
d$alsubj9[d$edqsub64=="classical civilisation"] <-14
d$alsubj9[d$edqsub64=="CLASSICAL CIVILISATION"] <-14
d$alsubj9[d$edqsub64=="CLASSICAL CIVILISATIONS"] <-14
d$alsubj9[d$edqsub64=="CLASSICAL CIVILIZATION"] <-14
d$alsubj9[d$edqsub64=="CLASSICAL STUDIES"] <-14
d$alsubj9[d$edqsub64=="CLASSICS"] <-15
d$alsubj9[d$edqsub64=="COMMUNICATION STUDIES"] <-16
d$alsubj9[d$edqsub64=="communication studies"] <-16
d$alsubj9[d$edqsub64=="COMMUNICATIONS"] <-16
d$alsubj9[d$edqsub64=="COMMUNICATIONS STUDIES"] <-16
d$alsubj9[d$edqsub64=="Communications studies"] <-16
d$alsubj9[d$edqsub64=="applied computer science"] <-17
d$alsubj9[d$edqsub64=="comp studies"] <-17
d$alsubj9[d$edqsub64=="COMPTUTING SKILLS"] <-17
d$alsubj9[d$edqsub64=="COMPUTER PROGRAMMING"] <-17
d$alsubj9[d$edqsub64=="Computer Science"] <-17
d$alsubj9[d$edqsub64=="COMPUTER SCIENCE"] <-17
d$alsubj9[d$edqsub64=="computer science"] <-17
d$alsubj9[d$edqsub64=="computer sciences"] <-17
d$alsubj9[d$edqsub64=="Computer Sciencse"] <-17
d$alsubj9[d$edqsub64=="COMPUTER SICENCE"] <-17
d$alsubj9[d$edqsub64=="Computer Studies"] <-17
d$alsubj9[d$edqsub64=="Computer Studies"] <-17
d$alsubj9[d$edqsub64=="computer studies"] <-17
d$alsubj9[d$edqsub64=="Computer studies"] <-17
d$alsubj9[d$edqsub64=="computing"] <-17
d$alsubj9[d$edqsub64=="Computing"] <-17
d$alsubj9[d$edqsub64=="coputer science"] <-17
d$alsubj9[d$edqsub64=="information Technology"] <-17
d$alsubj9[d$edqsub64=="IT"] <-17
d$alsubj9[d$edqsub64=="Computer science S level"] <-18
d$alsubj9[d$edqsub64=="craft design and technolo"] <-19
d$alsubj9[d$edqsub64=="Design"] <-19
d$alsubj9[d$edqsub64=="design"] <-19
d$alsubj9[d$edqsub64=="DESIGN"] <-19
d$alsubj9[d$edqsub64=="dESIGN & tECHNOLGY"] <-19
d$alsubj9[d$edqsub64=="Design & Technology"] <-19
d$alsubj9[d$edqsub64=="design and technology"] <-19
d$alsubj9[d$edqsub64=="Design and Technology"] <-19
d$alsubj9[d$edqsub64=="design craft and technolo"] <-19
d$alsubj9[d$edqsub64=="design technology"] <-19
d$alsubj9[d$edqsub64=="DESIGN TECHNOLOGY"] <-19
d$alsubj9[d$edqsub64=="c.d.t"] <-19
d$alsubj9[d$edqsub64=="technology"] <-19
d$alsubj9[d$edqsub64=="Technology"] <-19
d$alsubj9[d$edqsub64=="DRAMA"] <-20
d$alsubj9[d$edqsub64=="Drama"] <-20
d$alsubj9[d$edqsub64=="drama and theatre arts"] <-20
d$alsubj9[d$edqsub64=="dance"] <-20
d$alsubj9[d$edqsub64=="Dance and Drama"] <-20
d$alsubj9[d$edqsub64=="ECCONOMICS"] <-21
d$alsubj9[d$edqsub64=="ecomics"] <-21
d$alsubj9[d$edqsub64=="ECOMICS"] <-21
d$alsubj9[d$edqsub64=="ecomincs"] <-21
d$alsubj9[d$edqsub64=="Ecomonics"] <-21
d$alsubj9[d$edqsub64=="ecomopmics"] <-21
d$alsubj9[d$edqsub64=="econ"] <-21
d$alsubj9[d$edqsub64=="ECON"] <-21
d$alsubj9[d$edqsub64=="ECONIICS"] <-21
d$alsubj9[d$edqsub64=="Econimics"] <-21
d$alsubj9[d$edqsub64=="econimics"] <-21
d$alsubj9[d$edqsub64=="Econimins"] <-21
d$alsubj9[d$edqsub64=="Econmics"] <-21
d$alsubj9[d$edqsub64=="econo;mics"] <-21
d$alsubj9[d$edqsub64=="ECONOMIC"] <-21
d$alsubj9[d$edqsub64=="Economic"] <-21
d$alsubj9[d$edqsub64=="economic and social histo"] <-21
d$alsubj9[d$edqsub64=="economices"] <-21
d$alsubj9[d$edqsub64=="economics"] <-21
d$alsubj9[d$edqsub64=="Economics"] <-21
d$alsubj9[d$edqsub64=="ECONOMICS"] <-21
d$alsubj9[d$edqsub64=="economics & politics"] <-21
d$alsubj9[d$edqsub64=="Economics & World Affairs"] <-21
d$alsubj9[d$edqsub64=="economics with politics"] <-21
d$alsubj9[d$edqsub64=="economicse"] <-21
d$alsubj9[d$edqsub64=="economis and world affair"] <-21
d$alsubj9[d$edqsub64=="Ecvonomics"] <-21
d$alsubj9[d$edqsub64=="encominics"] <-21
d$alsubj9[d$edqsub64=="ECONOMICS AT S LEVEL"] <-22
d$alsubj9[d$edqsub64=="Electronic Systems"] <-23
d$alsubj9[d$edqsub64=="ELECTRONIC\S#"] <-23
d$alsubj9[d$edqsub64=="eLECTRONICS"] <-23
d$alsubj9[d$edqsub64=="Electronics"] <-23
d$alsubj9[d$edqsub64=="electronics"] <-23
d$alsubj9[d$edqsub64=="ELECTRONICS"] <-23
d$alsubj9[d$edqsub64=="Electronics"] <-23
d$alsubj9[d$edqsub64=="electronics/statistics"] <-23
d$alsubj9[d$edqsub64=="microelectronics"] <-23
d$alsubj9[d$edqsub64=="ENGINEERING"] <-24
d$alsubj9[d$edqsub64=="ENGINEERING DRAWING"] <-24
d$alsubj9[d$edqsub64=="Engineering Drawing"] <-24
d$alsubj9[d$edqsub64=="Engineering drawing"] <-24
d$alsubj9[d$edqsub64=="engineering drawing"] <-24
d$alsubj9[d$edqsub64=="ENGINEERING DRAWING AND D"] <-24
d$alsubj9[d$edqsub64=="ENGINEERING METALWORK"] <-24
d$alsubj9[d$edqsub64=="ENGINEERING SCIENCE"] <-24
d$alsubj9[d$edqsub64=="Geometric and Engineering"] <-24
d$alsubj9[d$edqsub64=="combined english"] <-25
d$alsubj9[d$edqsub64=="ebglish"] <-25
d$alsubj9[d$edqsub64=="En g Lit"] <-25
d$alsubj9[d$edqsub64=="eng"] <-25
d$alsubj9[d$edqsub64=="ENG"] <-25
d$alsubj9[d$edqsub64=="ENG .LIT"] <-25
d$alsubj9[d$edqsub64=="eng lang"] <-25
d$alsubj9[d$edqsub64=="ENG LANG"] <-25
d$alsubj9[d$edqsub64=="Eng Lang"] <-25
d$alsubj9[d$edqsub64=="eng language/literature"] <-25
d$alsubj9[d$edqsub64=="ENG LIT"] <-25
d$alsubj9[d$edqsub64=="eng lit"] <-25
d$alsubj9[d$edqsub64=="Eng lit"] <-25
d$alsubj9[d$edqsub64=="eng lit."] <-25
d$alsubj9[d$edqsub64=="eng Slevel"] <-25
d$alsubj9[d$edqsub64=="Eng. Lit"] <-25
d$alsubj9[d$edqsub64=="ENG. LIT"] <-25
d$alsubj9[d$edqsub64=="Eng. Lit."] <-25
d$alsubj9[d$edqsub64=="ENG.LIT 1"] <-25
d$alsubj9[d$edqsub64=="eng.lit."] <-25
d$alsubj9[d$edqsub64=="eng/language."] <-25
d$alsubj9[d$edqsub64=="engl"] <-25
d$alsubj9[d$edqsub64=="English"] <-25
d$alsubj9[d$edqsub64=="ENGLISH"] <-25
d$alsubj9[d$edqsub64=="english"] <-25
d$alsubj9[d$edqsub64=="English  lit."] <-25
d$alsubj9[d$edqsub64=="English  lit."] <-25
d$alsubj9[d$edqsub64=="English (Literature)"] <-25
d$alsubj9[d$edqsub64=="ENGLISH ;LITERATURE"] <-25
d$alsubj9[d$edqsub64=="ENGLISH LANG"] <-25
d$alsubj9[d$edqsub64=="english lang"] <-25
d$alsubj9[d$edqsub64=="ENGLISH LANG & LIT"] <-25
d$alsubj9[d$edqsub64=="English Lang and Lit"] <-25
d$alsubj9[d$edqsub64=="English Lang."] <-25
d$alsubj9[d$edqsub64=="english lang.& lit."] <-25
d$alsubj9[d$edqsub64=="English lang/lit"] <-25
d$alsubj9[d$edqsub64=="ENGLISH LANG/LIT"] <-25
d$alsubj9[d$edqsub64=="english language"] <-25
d$alsubj9[d$edqsub64=="English Language"] <-25
d$alsubj9[d$edqsub64=="english language"] <-25
d$alsubj9[d$edqsub64=="ENGLISH LANGUAGE"] <-25
d$alsubj9[d$edqsub64=="English language"] <-25
d$alsubj9[d$edqsub64=="english Language"] <-25
d$alsubj9[d$edqsub64=="English language & Litera"] <-25
d$alsubj9[d$edqsub64=="english language & litera"] <-25
d$alsubj9[d$edqsub64=="ENGLISH LANGUAGE AND LIT"] <-25
d$alsubj9[d$edqsub64=="ENGLISH LANGUAGE AND LITE"] <-25
d$alsubj9[d$edqsub64=="english language/literatu"] <-25
d$alsubj9[d$edqsub64=="english lit"] <-25
d$alsubj9[d$edqsub64=="ENGLISH LIT"] <-25
d$alsubj9[d$edqsub64=="English Lit"] <-25
d$alsubj9[d$edqsub64=="english lit and lang"] <-25
d$alsubj9[d$edqsub64=="ENGLISH LIT AND LANGUAGE"] <-25
d$alsubj9[d$edqsub64=="english lit."] <-25
d$alsubj9[d$edqsub64=="English lit."] <-25
d$alsubj9[d$edqsub64=="ENGLISH LIT."] <-25
d$alsubj9[d$edqsub64=="English lit/lang"] <-25
d$alsubj9[d$edqsub64=="english litand language"] <-25
d$alsubj9[d$edqsub64=="english litature"] <-25
d$alsubj9[d$edqsub64=="ENGLISH LITERATURE"] <-25
d$alsubj9[d$edqsub64=="English Literature"] <-25
d$alsubj9[d$edqsub64=="english literature"] <-25
d$alsubj9[d$edqsub64=="English literature"] <-25
d$alsubj9[d$edqsub64=="English Literature & Lang"] <-25
d$alsubj9[d$edqsub64=="ENGLISH LITERATURE & LANG"] <-25
d$alsubj9[d$edqsub64=="English Literature/Lang."] <-25
d$alsubj9[d$edqsub64=="English Litereature"] <-25
d$alsubj9[d$edqsub64=="ENGLISH LITERTURA"] <-25
d$alsubj9[d$edqsub64=="English Litterature"] <-25
d$alsubj9[d$edqsub64=="english not specific"] <-25
d$alsubj9[d$edqsub64=="ENLISH"] <-25
d$alsubj9[d$edqsub64=="ENLISH LANGUAGE/LITERATUR"] <-25
d$alsubj9[d$edqsub64=="Environmental Sc"] <-62
d$alsubj9[d$edqsub64=="environmental science"] <-62
d$alsubj9[d$edqsub64=="Environmental Studies"] <-62
d$alsubj9[d$edqsub64=="Fashion"] <-52
d$alsubj9[d$edqsub64=="fashion"] <-52
d$alsubj9[d$edqsub64=="Fashion & textiles"] <-52
d$alsubj9[d$edqsub64=="fashion and design"] <-52
d$alsubj9[d$edqsub64=="fashion and fabric"] <-52
d$alsubj9[d$edqsub64=="Fashion design"] <-52
d$alsubj9[d$edqsub64=="film studies"]					<-26
d$alsubj9[d$edqsub64=="FILM STUDIES"] <-26
d$alsubj9[d$edqsub64=="freanch"] <-27
d$alsubj9[d$edqsub64=="frech"	] <-27
d$alsubj9[d$edqsub64=="FRENCH"] <-27
d$alsubj9[d$edqsub64=="french"] <-27
d$alsubj9[d$edqsub64=="French"] <-27
d$alsubj9[d$edqsub64=="french for business"] <-27
d$alsubj9[d$edqsub64=="french lang"]					<-27		
d$alsubj9[d$edqsub64=="French Literature"] <-27
d$alsubj9[d$edqsub64=="FRENCH1"] <-27
d$alsubj9[d$edqsub64=="French S level"] <-28
d$alsubj9[d$edqsub64=="Furhther Maths"] <-29
d$alsubj9[d$edqsub64=="further math"] <-29
d$alsubj9[d$edqsub64=="further mathematics"] <-29
d$alsubj9[d$edqsub64=="Further mathematics"] <-29
d$alsubj9[d$edqsub64=="FURTHER MATHEMATICS"] <-29
d$alsubj9[d$edqsub64=="Further Mathematics"] <-29
d$alsubj9[d$edqsub64=="further maths"] <-29
d$alsubj9[d$edqsub64=="Further Maths"] <-29
d$alsubj9[d$edqsub64=="Futher maths"] <-29
d$alsubj9[d$edqsub64=="FURTHER MATHS"] <-29
d$alsubj9[d$edqsub64=="FURTHER MATH"] <-29
d$alsubj9[d$edqsub64=="Further Maths - Pure and"] <-29
d$alsubj9[d$edqsub64=="FURTHER MATHS A LEVEL"] <-29
d$alsubj9[d$edqsub64=="FUTHER MATHS"] <-29
d$alsubj9[d$edqsub64=="further maths (s)"] <-30
d$alsubj9[d$edqsub64=="FURTHER MATHS S LEVEL"] <-30
d$alsubj9[d$edqsub64=="FURTHER MATHS STEP"] <-30
d$alsubj9[d$edqsub64=="S level further maths"] <-30
d$alsubj9[d$edqsub64=="GEN STUD"] <-31
d$alsubj9[d$edqsub64=="gen stud"] <-31
d$alsubj9[d$edqsub64=="gen studies"] <-31
d$alsubj9[d$edqsub64=="GEN STUDIES"] <-31
d$alsubj9[d$edqsub64=="Gen studies"] <-31
d$alsubj9[d$edqsub64=="Gen Studies"] <-31
d$alsubj9[d$edqsub64=="GEN STUDIES RELIGIOUS STU"] <-31
d$alsubj9[d$edqsub64=="gen. studies"] <-31
d$alsubj9[d$edqsub64=="gen.studies"] <-31
d$alsubj9[d$edqsub64=="general"] <-31
d$alsubj9[d$edqsub64=="GENERAL"] <-31
d$alsubj9[d$edqsub64=="general   studies"] <-31
d$alsubj9[d$edqsub64=="general  tudies"] <-31
d$alsubj9[d$edqsub64=="general knowl;edfge"] <-31
d$alsubj9[d$edqsub64=="GENERAL STIUDIES"] <-31
d$alsubj9[d$edqsub64=="GENERAL STUDIES"] <-31
d$alsubj9[d$edqsub64=="general studies"] <-31
d$alsubj9[d$edqsub64=="General studies"] <-31
d$alsubj9[d$edqsub64=="General Studies"] <-31
d$alsubj9[d$edqsub64=="GENERAL STUDY"] <-31
d$alsubj9[d$edqsub64=="general study"] <-31
d$alsubj9[d$edqsub64=="general studys"] <-31
d$alsubj9[d$edqsub64=="Genereal Studies"] <-31
d$alsubj9[d$edqsub64=="genstudies"] <-31
d$alsubj9[d$edqsub64=="1GEOGRAPHY"] <-32
d$alsubj9[d$edqsub64=="gegraphy"] <-32
d$alsubj9[d$edqsub64=="GEGRAPHY"] <-32
d$alsubj9[d$edqsub64=="geoagraphy"] <-32
d$alsubj9[d$edqsub64=="geog"] <-32
d$alsubj9[d$edqsub64=="Geog"] <-32
d$alsubj9[d$edqsub64=="GEOG"] <-32
d$alsubj9[d$edqsub64=="GEOGHRAY"] <-32
d$alsubj9[d$edqsub64=="geogr"] <-32
d$alsubj9[d$edqsub64=="GEOGRAGHY"] <-32
d$alsubj9[d$edqsub64=="GEOGRAHY"] <-32
d$alsubj9[d$edqsub64=="geographt"] <-32
d$alsubj9[d$edqsub64=="GEOGRAPHY"] <-32
d$alsubj9[d$edqsub64=="Geography"] <-32
d$alsubj9[d$edqsub64=="geography"] <-32
d$alsubj9[d$edqsub64=="geography grade d"] <-32
d$alsubj9[d$edqsub64=="geographyy"] <-32
d$alsubj9[d$edqsub64=="geograqphy"] <-32
d$alsubj9[d$edqsub64=="geophraphy"] <-32
d$alsubj9[d$edqsub64=="gepgraphy"] <-32
d$alsubj9[d$edqsub64=="GOEG"] <-32
d$alsubj9[d$edqsub64=="goegraphy"] <-32
d$alsubj9[d$edqsub64=="goegraphy"] <-32
d$alsubj9[d$edqsub64=="geog   s level"] <-33
d$alsubj9[d$edqsub64=="geog s level"] <-33
d$alsubj9[d$edqsub64=="GEOGRAPHY S LEVEL"] <-33
d$alsubj9[d$edqsub64=="geography s level"] <-33
d$alsubj9[d$edqsub64=="geology"] <-34
d$alsubj9[d$edqsub64=="Geology"] <-34
d$alsubj9[d$edqsub64=="GEOLOGY"] <-34
d$alsubj9[d$edqsub64=="German"] <-35
d$alsubj9[d$edqsub64=="german"] <-35
d$alsubj9[d$edqsub64=="GERMAN"] <-35
d$alsubj9[d$edqsub64=="German S level"] <-35
d$alsubj9[d$edqsub64=="German."] <-35
d$alsubj9[d$edqsub64=="gevernment politics"] <-36
d$alsubj9[d$edqsub64=="govenment and politics"] <-36
d$alsubj9[d$edqsub64=="GOVERNMENT"] <-36
d$alsubj9[d$edqsub64=="Government & politics"] <-36
d$alsubj9[d$edqsub64=="GOVERNMENT & POLITICS"] <-36
d$alsubj9[d$edqsub64=="GOVERNMENT & POLITICS"] <-36
d$alsubj9[d$edqsub64=="GOVERNMENT AND POLITICAL"] <-36
d$alsubj9[d$edqsub64=="GOVERNMENT AND POLITICS"] <-36
d$alsubj9[d$edqsub64=="government and politics"] <-36
d$alsubj9[d$edqsub64=="Government and Politics"] <-36
d$alsubj9[d$edqsub64=="GOVERNMENT POLITICS"] <-36
d$alsubj9[d$edqsub64=="governmental politics"] <-36
d$alsubj9[d$edqsub64=="Govrnment and politics"] <-36
d$alsubj9[d$edqsub64=="Govt and politics"] <-36
d$alsubj9[d$edqsub64=="GOVT AND POLITICS"] <-36
d$alsubj9[d$edqsub64=="GOVT. AND POLITICS"] <-36
d$alsubj9[d$edqsub64=="govt/politics"] <-36
d$alsubj9[d$edqsub64=="GRAPHIC \DESIGN"] <-37
d$alsubj9[d$edqsub64=="GRAPHIC DESIGN"] <-37
d$alsubj9[d$edqsub64=="Graphic Design"] <-37
d$alsubj9[d$edqsub64=="graphic design"] <-37
d$alsubj9[d$edqsub64=="graphical communication"] <-37
d$alsubj9[d$edqsub64=="Graphical communication"] <-37
d$alsubj9[d$edqsub64=="gre ke"] <-38
d$alsubj9[d$edqsub64=="GREEK"] <-38
d$alsubj9[d$edqsub64=="greek"] <-38
d$alsubj9[d$edqsub64== "MODERN GREEK"] <-38
d$alsubj9[d$edqsub64==";history"] <-39
d$alsubj9[d$edqsub64=="19 centuary british and e"] <-39
d$alsubj9[d$edqsub64=="American History"] <-39
d$alsubj9[d$edqsub64=="HIDTORY"] <-39
d$alsubj9[d$edqsub64=="hist"] <-39
d$alsubj9[d$edqsub64=="History"] <-39
d$alsubj9[d$edqsub64=="HISTORY"] <-39
d$alsubj9[d$edqsub64=="history"] <-39
d$alsubj9[d$edqsub64=="History (modern)"] <-39
d$alsubj9[d$edqsub64=="History."] <-39
d$alsubj9[d$edqsub64=="Histoy"] <-39
d$alsubj9[d$edqsub64=="histroy"] <-39
d$alsubj9[d$edqsub64=="medeaevil history"] <-39
d$alsubj9[d$edqsub64=="MEDIEVAL HISTORY"] <-39
d$alsubj9[d$edqsub64=="MODERN HISTORY"] <-39
d$alsubj9[d$edqsub64=="Social & Economic History"] <-39
d$alsubj9[d$edqsub64=="Social and economic histo"] <-39
d$alsubj9[d$edqsub64=="HISTORY S LEVEL"] <-40
d$alsubj9[d$edqsub64=="history S level"] <-40
d$alsubj9[d$edqsub64=="hum,an bilogy"] <-62
d$alsubj9[d$edqsub64=="human  biology"] <-62
d$alsubj9[d$edqsub64=="human biology"] <-62
d$alsubj9[d$edqsub64=="Human biology"] <-62
d$alsubj9[d$edqsub64=="Human Biology"] <-62
d$alsubj9[d$edqsub64=="human physiology"] <-62
d$alsubj9[d$edqsub64=="HUMAN BIOLOGY"] <-62
d$alsubj9[d$edqsub64=="HUMAN PHYSIOLOGY"] <-62
d$alsubj9[d$edqsub64=="humanbiology"] <-62
d$alsubj9[d$edqsub64=="humanphysiology"] <-62
d$alsubj9[d$edqsub64=="industrila studies"] <-41
d$alsubj9[d$edqsub64=="Industrial Studies"] <-41
d$alsubj9[d$edqsub64=="Italian"] <-42
d$alsubj9[d$edqsub64=="LATIN"] <-43
d$alsubj9[d$edqsub64=="latin"] <-43
d$alsubj9[d$edqsub64=="Latin"] <-43
d$alsubj9[d$edqsub64=="Latin S level"] <-44
d$alsubj9[d$edqsub64=="latin s level"] <-44
d$alsubj9[d$edqsub64=="LATIN SPECIAL"] <-44
d$alsubj9[d$edqsub64=="English Law."] <-45
d$alsubj9[d$edqsub64=="criminal law"] <-45
d$alsubj9[d$edqsub64=="Law"] <-45
d$alsubj9[d$edqsub64=="law"] <-45
d$alsubj9[d$edqsub64=="LAW"] <-45
d$alsubj9[d$edqsub64=="low"] <-45
d$alsubj9[d$edqsub64=="applied and pure maths"] <-46
d$alsubj9[d$edqsub64=="Applied Mathematics"] <-46
d$alsubj9[d$edqsub64=="applied mathematics"] <-46
d$alsubj9[d$edqsub64=="APPLIED MATHS"] <-46
d$alsubj9[d$edqsub64=="applied maths"] <-46
d$alsubj9[d$edqsub64=="Applied Maths"] <-46
d$alsubj9[d$edqsub64=="combined maths"] <-46
d$alsubj9[d$edqsub64=="Maaths"] <-46
d$alsubj9[d$edqsub64=="Matematics"] <-46
d$alsubj9[d$edqsub64=="MATH"] <-46
d$alsubj9[d$edqsub64=="math"] <-46
d$alsubj9[d$edqsub64=="Math & General knowladge"] <-46
d$alsubj9[d$edqsub64=="Mathematics"] <-46
d$alsubj9[d$edqsub64=="mATHEMATICS"] <-46
d$alsubj9[d$edqsub64=="MATHEMATICS"] <-46
d$alsubj9[d$edqsub64=="mathematics"] <-46
d$alsubj9[d$edqsub64=="MATHEMATICS - PURE/APLIED"] <-46
d$alsubj9[d$edqsub64=="mathematics and art"] <-46
d$alsubj9[d$edqsub64=="Mathematics and Statistic"] <-46
d$alsubj9[d$edqsub64=="Mathematics with stats"] <-46
d$alsubj9[d$edqsub64=="mathematics, pure and app"] <-46
d$alsubj9[d$edqsub64=="MATHMATICS AND STATISTICS"] <-46
d$alsubj9[d$edqsub64=="Maths"] <-46
d$alsubj9[d$edqsub64=="maths"] <-46
d$alsubj9[d$edqsub64=="MATHS"] <-46
d$alsubj9[d$edqsub64=="maths & mechanics"] <-46
d$alsubj9[d$edqsub64=="Maths & Statistics"] <-46
d$alsubj9[d$edqsub64=="maths & statistics"] <-46
d$alsubj9[d$edqsub64=="Maths (pure and Applied)"] <-46
d$alsubj9[d$edqsub64=="Maths /pure and applied"] <-46
d$alsubj9[d$edqsub64=="maths + stats"] <-46
d$alsubj9[d$edqsub64=="MATHS A LEVEL"] <-46
d$alsubj9[d$edqsub64=="maths an"] <-46
d$alsubj9[d$edqsub64=="MATHS AND STATISTICS"] <-46
d$alsubj9[d$edqsub64=="maths and statistics"] <-46
d$alsubj9[d$edqsub64=="Maths and stats"] <-46
d$alsubj9[d$edqsub64=="MATHS AND STATS"] <-46
d$alsubj9[d$edqsub64=="maths AS"] <-46
d$alsubj9[d$edqsub64=="maths pure"] <-46
d$alsubj9[d$edqsub64=="maths pure and applied"] <-46
d$alsubj9[d$edqsub64=="MATHS- PURE AND APPLIED"] <-46
d$alsubj9[d$edqsub64=="Maths pure l& applied"] <-46
d$alsubj9[d$edqsub64=="MATHS S LEVEL"] <-46
d$alsubj9[d$edqsub64=="MATHS WITH STATISTICS"] <-46
d$alsubj9[d$edqsub64=="maths with statistics"] <-46
d$alsubj9[d$edqsub64=="maths with stats"] <-46
d$alsubj9[d$edqsub64=="Maths with stats."] <-46
d$alsubj9[d$edqsub64=="MATHS, PURE AND APPLIED"] <-46
d$alsubj9[d$edqsub64=="maths."] <-46
d$alsubj9[d$edqsub64=="MATHS."] <-46
d$alsubj9[d$edqsub64=="Maths."] <-46
d$alsubj9[d$edqsub64=="Maths/pure and applied"] <-46
d$alsubj9[d$edqsub64=="Maths/Statistics"] <-46
d$alsubj9[d$edqsub64=="MATHSW"] <-46
d$alsubj9[d$edqsub64=="Mathsw"] <-46
d$alsubj9[d$edqsub64=="mechanics"] <-46
d$alsubj9[d$edqsub64=="MMaths"] <-46
d$alsubj9[d$edqsub64=="PURE & APPL MATHS"] <-46
d$alsubj9[d$edqsub64=="Pure & Applied Maths"] <-46
d$alsubj9[d$edqsub64=="pure and applied maths"] <-46
d$alsubj9[d$edqsub64=="PURE AND APPLIED MATHS"] <-46
d$alsubj9[d$edqsub64=="Pure M aths & Statistics"] <-46
d$alsubj9[d$edqsub64=="pure mathematics"] <-46
d$alsubj9[d$edqsub64=="PURE MATHEMATICS"] <-46
d$alsubj9[d$edqsub64=="pure mathematics"] <-46
d$alsubj9[d$edqsub64=="pure maths"] <-46
d$alsubj9[d$edqsub64=="PURE MATHS"] <-46
d$alsubj9[d$edqsub64=="Pure maths"] <-46
d$alsubj9[d$edqsub64=="Pure Maths"] <-46
d$alsubj9[d$edqsub64=="Pure Maths & Mechanics"] <-46
d$alsubj9[d$edqsub64=="Pure Maths & Statistics"] <-46
d$alsubj9[d$edqsub64=="Pure Maths & Stats"] <-46
d$alsubj9[d$edqsub64=="pure maths and statistics"] <-46
d$alsubj9[d$edqsub64=="PURE MATHS AND STATISTICS"] <-46
d$alsubj9[d$edqsub64=="PURE MATHS AND STATS"] <-46
d$alsubj9[d$edqsub64=="pure maths and stats"] <-46
d$alsubj9[d$edqsub64=="PURE MATHS WITH STATISTIC"] <-46
d$alsubj9[d$edqsub64=="pure maths with statistic"] <-46
d$alsubj9[d$edqsub64=="Pure maths with stats"] <-46
d$alsubj9[d$edqsub64=="PURE MATHS WITH STATS"] <-46
d$alsubj9[d$edqsub64=="pure maths with stats."] <-46
d$alsubj9[d$edqsub64=="pure maths witih stats."] <-46
d$alsubj9[d$edqsub64=="pure maths/statistics"] <-46
d$alsubj9[d$edqsub64=="pure/statistal maths"] <-46
d$alsubj9[d$edqsub64=="stastics"] <-46
d$alsubj9[d$edqsub64=="statisics"] <-46
d$alsubj9[d$edqsub64=="STATISTICS"] <-46
d$alsubj9[d$edqsub64=="statistics"] <-46
d$alsubj9[d$edqsub64=="Statistics"] <-46
d$alsubj9[d$edqsub64=="stats"] <-46
d$alsubj9[d$edqsub64=="STATS"] <-46
d$alsubj9[d$edqsub64=="Applied Maths S level"] <-47
d$alsubj9[d$edqsub64=="Maths S/level"] <-46
d$alsubj9[d$edqsub64=="S level maths"] <-46
d$alsubj9[d$edqsub64=="s' level maths"] <-46
d$alsubj9[d$edqsub64=="Step maths"] <-46
d$alsubj9[d$edqsub64=="MEDIA"] <-48
d$alsubj9[d$edqsub64=="Media studies"] <-48
d$alsubj9[d$edqsub64=="music"] <-49
d$alsubj9[d$edqsub64=="Music"] <-49
d$alsubj9[d$edqsub64=="MUSIC"] <-49
d$alsubj9[d$edqsub64=="music practical"] <-49
d$alsubj9[d$edqsub64=="music theory"] <-49
d$alsubj9[d$edqsub64=="Practical music"] <-49
d$alsubj9[d$edqsub64=="Rudiments of Music"] <-49
d$alsubj9[d$edqsub64=="STAGE DECOR AND COSTUME D"] <-50
d$alsubj9[d$edqsub64=="FINANCIAL CONTROL"] <-50
d$alsubj9[d$edqsub64=="ceramics"] <-51
d$alsubj9[d$edqsub64=="CRAFT"] <-51
d$alsubj9[d$edqsub64=="CRAFT DESIGN & THEATRE ST"] <-51
d$alsubj9[d$edqsub64=="POTTERY"] <-51
d$alsubj9[d$edqsub64=="printing"] <-52
d$alsubj9[d$edqsub64=="TEXTILE AND DRESS"] <-52
d$alsubj9[d$edqsub64=="DRESS"] <-52
d$alsubj9[d$edqsub64=="dress and design"] <-52
d$alsubj9[d$edqsub64=="FOOD AND NUTRITION"] <-52
d$alsubj9[d$edqsub64=="food and nutrition"] <-52
d$alsubj9[d$edqsub64=="home econimics"] <-52
d$alsubj9[d$edqsub64=="home economic"] <-52
d$alsubj9[d$edqsub64=="HOME ECONOMICS"] <-52
d$alsubj9[d$edqsub64=="Home Economics"] <-52
d$alsubj9[d$edqsub64=="home economics"] <-52
d$alsubj9[d$edqsub64=="home economics - sewing"] <-52
d$alsubj9[d$edqsub64=="Home economics."] <-52
d$alsubj9[d$edqsub64=="HOME, FAMILY AND SOCIETY"] <-52
d$alsubj9[d$edqsub64=="HOME, FAMILY AND SOCIETY"] <-52
d$alsubj9[d$edqsub64=="CONFECTIONERY TECHNOLOGY"] <-52
d$alsubj9[d$edqsub64=="cookery"] <-52
d$alsubj9[d$edqsub64=="COOKERY"] <-52
d$alsubj9[d$edqsub64=="Domestic Science"] <-52
d$alsubj9[d$edqsub64=="surveying"] <-52
d$alsubj9[d$edqsub64=="tech drawing"] <-52
d$alsubj9[d$edqsub64=="TECH DRAWING"] <-52
d$alsubj9[d$edqsub64=="tech drawing"] <-52
d$alsubj9[d$edqsub64=="TECHNICAL DRAWING"] <-52
d$alsubj9[d$edqsub64=="technical drawing"] <-52
d$alsubj9[d$edqsub64=="Technical DRawing"] <-52
d$alsubj9[d$edqsub64=="technical drawing"] <-52
d$alsubj9[d$edqsub64=="Technical Drawing"] <-52
d$alsubj9[d$edqsub64=="BUILDING CONSTRUCTION"] <-52
d$alsubj9[d$edqsub64=="building construction"] <-52
d$alsubj9[d$edqsub64=="Needlework"] <-52
d$alsubj9[d$edqsub64== "stage craft and design"] <-52
d$alsubj9[d$edqsub64=="SECIENE"] <-62
d$alsubj9[d$edqsub64=="Health Scencie"] <-62
d$alsubj9[d$edqsub64=="HEALTH STUDIES"] <-62
d$alsubj9[d$edqsub64=="Science in Society"] <-62
d$alsubj9[d$edqsub64=="philosophy"] <-54
d$alsubj9[d$edqsub64=="Philosophy"] <-54
d$alsubj9[d$edqsub64=="PHILOSOPHY"] <-54
d$alsubj9[d$edqsub64=="philosphy"] <-54
d$alsubj9[d$edqsub64=="phisics"] <-56
d$alsubj9[d$edqsub64=="PHOTOGRAPHY"] <-55
d$alsubj9[d$edqsub64=="photography"] <-55
d$alsubj9[d$edqsub64=="physical education"] <-68
d$alsubj9[d$edqsub64=="PHYSICAL EDUCATION"] <-68
d$alsubj9[d$edqsub64=="HPYSICS"] <-56
d$alsubj9[d$edqsub64=="PHSICS"] <-56
d$alsubj9[d$edqsub64=="phsics"] <-56
d$alsubj9[d$edqsub64=="phsyics"] <-56
d$alsubj9[d$edqsub64=="phycics"] <-56
d$alsubj9[d$edqsub64=="PHYS"] <-56
d$alsubj9[d$edqsub64=="phys/  maths"] <-56
d$alsubj9[d$edqsub64=="PHYSIC"] <-56
d$alsubj9[d$edqsub64=="PHYSICA"] <-56
d$alsubj9[d$edqsub64=="Physiccs"] <-56
d$alsubj9[d$edqsub64=="Physics"] <-56
d$alsubj9[d$edqsub64=="PHYSICS"] <-56
d$alsubj9[d$edqsub64=="physics"] <-56
d$alsubj9[d$edqsub64=="PHYSICS A LEVEL"] <-56
d$alsubj9[d$edqsub64=="PHYSICS WITH ELECTRONICS"] <-56
d$alsubj9[d$edqsub64=="Physics."] <-56
d$alsubj9[d$edqsub64=="PHYSYCS"] <-56
d$alsubj9[d$edqsub64=="pyschics"] <-56
d$alsubj9[d$edqsub64=="PYSICS"] <-56
d$alsubj9[d$edqsub64=="PHICS"] <-56
d$alsubj9[d$edqsub64=="physics (s)"] <-57
d$alsubj9[d$edqsub64=="Physics S/level"] <-57
d$alsubj9[d$edqsub64=="PHYSICS STEP"] <-57
d$alsubj9[d$edqsub64=="British and American Poli"] <-36
d$alsubj9[d$edqsub64=="BRITISH GOV AND POLITICS"] <-36
d$alsubj9[d$edqsub64=="BRITISH GOVERN AND POLITI"] <-36
d$alsubj9[d$edqsub64=="British government"] <-36
d$alsubj9[d$edqsub64=="british government and po"] <-36
d$alsubj9[d$edqsub64=="British Government l& Pol"] <-36
d$alsubj9[d$edqsub64=="British Govt and politics"] <-36
d$alsubj9[d$edqsub64=="polatics and government"] <-36
d$alsubj9[d$edqsub64=="POLICTICAL HISTORY"] <-36
d$alsubj9[d$edqsub64=="POLITICAL AND ECONOMIC ST"] <-36
d$alsubj9[d$edqsub64=="Political History"] <-36
d$alsubj9[d$edqsub64=="political History"] <-36
d$alsubj9[d$edqsub64=="political history"] <-36
d$alsubj9[d$edqsub64=="political science"] <-36
d$alsubj9[d$edqsub64=="Political Studies"] <-36
d$alsubj9[d$edqsub64=="political studiesd"] <-36
d$alsubj9[d$edqsub64=="politics"] <-36
d$alsubj9[d$edqsub64=="POLITICS"] <-36
d$alsubj9[d$edqsub64=="Politics"] <-36
d$alsubj9[d$edqsub64=="politics & economics"] <-36
d$alsubj9[d$edqsub64=="politics & government"] <-36
d$alsubj9[d$edqsub64=="politics and government"] <-36
d$alsubj9[d$edqsub64=="Politics."] <-36
d$alsubj9[d$edqsub64=="Phsychology"] <-59
d$alsubj9[d$edqsub64=="phsycology"] <-59
d$alsubj9[d$edqsub64=="phychology"] <-59
d$alsubj9[d$edqsub64=="PHYCOLOGY"] <-59
d$alsubj9[d$edqsub64=="phycology"] <-59
d$alsubj9[d$edqsub64=="physchology"] <-59
d$alsubj9[d$edqsub64=="Physchology"] <-59
d$alsubj9[d$edqsub64=="physclogy"] <-59
d$alsubj9[d$edqsub64=="Physco;ogy"] <-59
d$alsubj9[d$edqsub64=="PHYSCOLOGY"] <-59
d$alsubj9[d$edqsub64=="physology"] <-59
d$alsubj9[d$edqsub64=="pschology"] <-59
d$alsubj9[d$edqsub64=="pschology"] <-59
d$alsubj9[d$edqsub64=="pshycoclgy"] <-59
d$alsubj9[d$edqsub64=="PSYCHOLOGY"] <-59
d$alsubj9[d$edqsub64=="psychology"] <-59
d$alsubj9[d$edqsub64=="Psychology"] <-59
d$alsubj9[d$edqsub64=="Psycology"] <-59
d$alsubj9[d$edqsub64=="PSYCOLOGY"] <-59
d$alsubj9[d$edqsub64=="public affairs"] <-36
d$alsubj9[d$edqsub64=="PYSCOLOGY"] <-59
d$alsubj9[d$edqsub64=="Divinity"] <-60
d$alsubj9[d$edqsub64=="DIVINITY"] <-60
d$alsubj9[d$edqsub64=="r.e"] <-60
d$alsubj9[d$edqsub64=="R.E."] <-60
d$alsubj9[d$edqsub64=="R.e."] <-60
d$alsubj9[d$edqsub64=="RE"] <-60
d$alsubj9[d$edqsub64=="re"] <-60
d$alsubj9[d$edqsub64=="REL. STUDIES"] <-60
d$alsubj9[d$edqsub64=="relegious studies"] <-60
d$alsubj9[d$edqsub64=="philosi"] <-54
d$alsubj9[d$edqsub64=="RELIG STUDIES"] <-60
d$alsubj9[d$edqsub64=="religeous studies"] <-60
d$alsubj9[d$edqsub64=="religious education"] <-60
d$alsubj9[d$edqsub64=="Religious Education"] <-60
d$alsubj9[d$edqsub64=="RELIGIOUS EDUCATION"] <-60
d$alsubj9[d$edqsub64=="religious education"] <-60
d$alsubj9[d$edqsub64=="religious knowledge"] <-60
d$alsubj9[d$edqsub64=="religious studies"] <-60
d$alsubj9[d$edqsub64=="RELIGIOUS STUDIES"] <-60
d$alsubj9[d$edqsub64=="Religious studies"] <-60
d$alsubj9[d$edqsub64=="religous"] <-60
d$alsubj9[d$edqsub64=="Religous Education"] <-60
d$alsubj9[d$edqsub64=="scriptire"] <-60
d$alsubj9[d$edqsub64=="theology"] <-60
d$alsubj9[d$edqsub64=="russian"] <-61
d$alsubj9[d$edqsub64=="secretarial"] <-63
d$alsubj9[d$edqsub64=="SECRETARIAL"] <-63
d$alsubj9[d$edqsub64=="SECRETARIAL STUDIES"] <-63
d$alsubj9[d$edqsub64=="Secretarial studies"] <-63
d$alsubj9[d$edqsub64=="SOCIAL BIOLOGY"] <-62
d$alsubj9[d$edqsub64=="social biology"] <-62
d$alsubj9[d$edqsub64=="Social biology"] <-62
d$alsubj9[d$edqsub64=="Social Biology"] <-62
d$alsubj9[d$edqsub64=="SOCIAL POLICY ADMIN"] <-64
d$alsubj9[d$edqsub64=="SOCIAL POLICY"] <-64
d$alsubj9[d$edqsub64=="Social sciences"] <-65
d$alsubj9[d$edqsub64=="social studies"] <-65
d$alsubj9[d$edqsub64=="health and social care"] <-65
d$alsubj9[d$edqsub64=="SOCIALGY"] <-66
d$alsubj9[d$edqsub64=="socialogy"] <-66
d$alsubj9[d$edqsub64=="SOCIALOGY"] <-66
d$alsubj9[d$edqsub64=="Socialolgy"] <-66
d$alsubj9[d$edqsub64=="socialologu"] <-66
d$alsubj9[d$edqsub64=="Socialology"] <-66
d$alsubj9[d$edqsub64=="SOCIOLGY"] <-66
d$alsubj9[d$edqsub64=="socioligy"] <-66
d$alsubj9[d$edqsub64=="sociolocy"] <-66
d$alsubj9[d$edqsub64=="SOCIOLOGOY"] <-66
d$alsubj9[d$edqsub64=="SOCIOLOGY"] <-66
d$alsubj9[d$edqsub64=="Sociology"] <-66
d$alsubj9[d$edqsub64=="sociology"] <-66
d$alsubj9[d$edqsub64=="SOCIOPLOGY"] <-66
d$alsubj9[d$edqsub64=="spanish"] <-67
d$alsubj9[d$edqsub64=="Spanish"] <-67
d$alsubj9[d$edqsub64=="SPANISH"] <-67
d$alsubj9[d$edqsub64=="spannish"] <-67
d$alsubj9[d$edqsub64=="sports studies"] <-68
d$alsubj9[d$edqsub64=="SPORTS STUDIES"] <-68
d$alsubj9[d$edqsub64=="Sports Studies"] <-68
d$alsubj9[d$edqsub64=="theater studies"] <-69
d$alsubj9[d$edqsub64=="Theatre Arts"] <-69
d$alsubj9[d$edqsub64=="THEATRE STUDIEAS"] <-69
d$alsubj9[d$edqsub64=="theatre studies"] <-69
d$alsubj9[d$edqsub64=="Theatre studies"] <-69
d$alsubj9[d$edqsub64=="Theatre Studies"] <-69
d$alsubj9[d$edqsub64=="THEATRE STUDIES"] <-69
d$alsubj9[d$edqsub64=="theatre studys"] <-69
d$alsubj9[d$edqsub64=="theatre stuides"] <-69
d$alsubj9[d$edqsub64=="Urban Studies"] <-51
d$alsubj9[d$edqsub64=="Urdu"] <-70
d$alsubj9[d$edqsub64=="welsh"] <-71
d$alsubj9[d$edqsub64=="WELSH"] <-71
d$alsubj9[d$edqsub64=="war and society"] <-51
d$alsubj9[d$edqsub64=="ZOOLOGY"] <-62
d$alsubj9[d$edqsub64=="zoology"] <-62
d$alsubj9[d$edqsub64=="MANAGEMENT"] <-51
d$alsubj9[d$edqsub64=="modern studies"] <-51
d$alsubj9[d$edqsub64=="MODERN STUDIES"] <-51

# A-level subject 10
d$alsubj10<-NA
d$alsubj10[d$edqsub65=="ACCOUNT AND BUSINESS"] <-1
d$alsubj10[d$edqsub65=="ACCOUNTANCY"] <-1
d$alsubj10[d$edqsub65=="accountancy"] <-1
d$alsubj10[d$edqsub65=="Accountancy"] <-1
d$alsubj10[d$edqsub65=="accountancy"] <-1
d$alsubj10[d$edqsub65=="Accounting"] <-1
d$alsubj10[d$edqsub65=="Accounts"] <-1
d$alsubj10[d$edqsub65=="accounts"] <-1
d$alsubj10[d$edqsub65=="ACCOUNTS"] <-1
d$alsubj10[d$edqsub65=="accounts(business studies"] <-1
d$alsubj10[d$edqsub65=="acounts"] <-1
d$alsubj10[d$edqsub65=="ancient greek"] 		<-2
d$alsubj10[d$edqsub65=="ancient history"] <-3
d$alsubj10[d$edqsub65=="ANCIENT HISTORY"] <-3
d$alsubj10[d$edqsub65=="Ancient History"] <-3
d$alsubj10[d$edqsub65=="ANCIENT HISTORYU"] <-3
d$alsubj10[d$edqsub65=="archaeology"] <-4
d$alsubj10[d$edqsub65=="Archaeology"] <-4
d$alsubj10[d$edqsub65=="2 dimensional art"] <-5
d$alsubj10[d$edqsub65=="art"] <-5
d$alsubj10[d$edqsub65=="3 dimensional art"] <-5
d$alsubj10[d$edqsub65=="Art"] <-5
d$alsubj10[d$edqsub65=="ART"] <-5
d$alsubj10[d$edqsub65=="ARTS"] <-5
d$alsubj10[d$edqsub65=="fine art"] <-5
d$alsubj10[d$edqsub65=="FINE ART"] <-5
d$alsubj10[d$edqsub65=="STUDY OF ART"] <-5
d$alsubj10[d$edqsub65=="Art & Craft"] <-5
d$alsubj10[d$edqsub65=="Art & Design"] <-5
d$alsubj10[d$edqsub65=="art & design technology"] <-5
d$alsubj10[d$edqsub65=="ART 7 DESIGN"] <-5
d$alsubj10[d$edqsub65=="ART AND ART HISTORY"] <-5
d$alsubj10[d$edqsub65=="Art and Art History"] <-5
d$alsubj10[d$edqsub65=="art and crafts"] <-5
d$alsubj10[d$edqsub65=="Art and design"] <-5
d$alsubj10[d$edqsub65=="ART AND DESIGN"] <-5
d$alsubj10[d$edqsub65=="art/design"] <-5
d$alsubj10[d$edqsub65=="art history"] <-5
d$alsubj10[d$edqsub65=="Art History"] <-5
d$alsubj10[d$edqsub65=="art with art history"] <-5
d$alsubj10[d$edqsub65=="ART WITH ART HISTORY"] <-5
d$alsubj10[d$edqsub65=="art/art history"] <-5
d$alsubj10[d$edqsub65=="Art/Art History"] <-5
d$alsubj10[d$edqsub65=="history of aft"] <-5
d$alsubj10[d$edqsub65=="History of art"] <-5
d$alsubj10[d$edqsub65=="History of Art"] <-5
d$alsubj10[d$edqsub65=="bilogy"] <-6
d$alsubj10[d$edqsub65=="biol"] <-6
d$alsubj10[d$edqsub65=="biol;gy"] <-6
d$alsubj10[d$edqsub65=="Biology"] <-6
d$alsubj10[d$edqsub65=="biology"] <-6
d$alsubj10[d$edqsub65=="BIOLOGY"] <-6
d$alsubj10[d$edqsub65=="biology  c"] <-6
d$alsubj10[d$edqsub65=="Biology - retake"] <-6
d$alsubj10[d$edqsub65=="boilogy"] <-6
d$alsubj10[d$edqsub65=="BOTTANY"] <-6
d$alsubj10[d$edqsub65=="practical biology"] <-6
d$alsubj10[d$edqsub65=="theoretical biology"] <-6
d$alsubj10[d$edqsub65=="biology s level"] <-7
d$alsubj10[d$edqsub65=="buisiness studies"] <-11
d$alsubj10[d$edqsub65=="BUISNESS STUDIES"] <-11
d$alsubj10[d$edqsub65=="BUISNESS STUDIES"] <-11
d$alsubj10[d$edqsub65=="buisness studies"] <-11
d$alsubj10[d$edqsub65=="BUISNESS STUDIES"] <-11
d$alsubj10[d$edqsub65=="business"] <-11
d$alsubj10[d$edqsub65=="Business Studies"] <-11
d$alsubj10[d$edqsub65=="BUSINESS STUDIES BIOLOGY"] <-11
d$alsubj10[d$edqsub65=="Business SudiesInform"] <-11
d$alsubj10[d$edqsub65=="CEMISTERY"] <-12
d$alsubj10[d$edqsub65=="CHE M"] <-12
d$alsubj10[d$edqsub65=="CHEM"] <-12
d$alsubj10[d$edqsub65=="Chem"] <-12
d$alsubj10[d$edqsub65=="chem"] <-12
d$alsubj10[d$edqsub65=="chemestry"] <-12
d$alsubj10[d$edqsub65=="CHEMISRTY"] <-12
d$alsubj10[d$edqsub65=="chemisrty"] <-12
d$alsubj10[d$edqsub65=="CHEMISTERY"] <-12
d$alsubj10[d$edqsub65=="chemistrry"] <-12
d$alsubj10[d$edqsub65=="Chemistry"] <-12
d$alsubj10[d$edqsub65=="CHEMISTRY"] <-12
d$alsubj10[d$edqsub65=="Chemistry - retake"] <-12
d$alsubj10[d$edqsub65=="chemistry (s)"] <-12
d$alsubj10[d$edqsub65=="CHEMISTRY A LEVEL"] <-12
d$alsubj10[d$edqsub65=="chemistyr"] <-12
d$alsubj10[d$edqsub65=="CHEMISTYR"] <-12
d$alsubj10[d$edqsub65=="CHEMSTRY"] <-12
d$alsubj10[d$edqsub65=="CHENISTRY"] <-12
d$alsubj10[d$edqsub65=="Chemistry S level"] <-13
d$alsubj10[d$edqsub65=="chemistry s level"] <-13
d$alsubj10[d$edqsub65=="Chemistry -S level"] <-13
d$alsubj10[d$edqsub65=="s' level chemestry"] <-13
d$alsubj10[d$edqsub65=="Special Chemistry"] <-13
d$alsubj10[d$edqsub65=="clasical civilisation"] <-14
d$alsubj10[d$edqsub65=="clasics"] <-14
d$alsubj10[d$edqsub65=="classical civilations"] <-14
d$alsubj10[d$edqsub65=="classical civilisation"] <-14
d$alsubj10[d$edqsub65=="CLASSICAL CIVILISATION"] <-14
d$alsubj10[d$edqsub65=="CLASSICAL CIVILISATIONS"] <-14
d$alsubj10[d$edqsub65=="CLASSICAL CIVILIZATION"] <-14
d$alsubj10[d$edqsub65=="CLASSICAL STUDIES"] <-14
d$alsubj10[d$edqsub65=="CLASSICS"] <-15
d$alsubj10[d$edqsub65=="COMMUNICATION STUDIES"] <-16
d$alsubj10[d$edqsub65=="communication studies"] <-16
d$alsubj10[d$edqsub65=="COMMUNICATIONS"] <-16
d$alsubj10[d$edqsub65=="COMMUNICATIONS STUDIES"] <-16
d$alsubj10[d$edqsub65=="Communications studies"] <-16
d$alsubj10[d$edqsub65=="applied computer science"] <-17
d$alsubj10[d$edqsub65=="comp studies"] <-17
d$alsubj10[d$edqsub65=="COMPTUTING SKILLS"] <-17
d$alsubj10[d$edqsub65=="COMPUTER PROGRAMMING"] <-17
d$alsubj10[d$edqsub65=="Computer Science"] <-17
d$alsubj10[d$edqsub65=="COMPUTER SCIENCE"] <-17
d$alsubj10[d$edqsub65=="computer science"] <-17
d$alsubj10[d$edqsub65=="computer sciences"] <-17
d$alsubj10[d$edqsub65=="Computer Sciencse"] <-17
d$alsubj10[d$edqsub65=="COMPUTER SICENCE"] <-17
d$alsubj10[d$edqsub65=="Computer Studies"] <-17
d$alsubj10[d$edqsub65=="Computer Studies"] <-17
d$alsubj10[d$edqsub65=="computer studies"] <-17
d$alsubj10[d$edqsub65=="Computer studies"] <-17
d$alsubj10[d$edqsub65=="computing"] <-17
d$alsubj10[d$edqsub65=="Computing"] <-17
d$alsubj10[d$edqsub65=="coputer science"] <-17
d$alsubj10[d$edqsub65=="information Technology"] <-17
d$alsubj10[d$edqsub65=="IT"] <-17
d$alsubj10[d$edqsub65=="Computer science S level"] <-18
d$alsubj10[d$edqsub65=="craft design and technolo"] <-19
d$alsubj10[d$edqsub65=="Design"] <-19
d$alsubj10[d$edqsub65=="design"] <-19
d$alsubj10[d$edqsub65=="DESIGN"] <-19
d$alsubj10[d$edqsub65=="dESIGN & tECHNOLGY"] <-19
d$alsubj10[d$edqsub65=="Design & Technology"] <-19
d$alsubj10[d$edqsub65=="design and technology"] <-19
d$alsubj10[d$edqsub65=="Design and Technology"] <-19
d$alsubj10[d$edqsub65=="design craft and technolo"] <-19
d$alsubj10[d$edqsub65=="design technology"] <-19
d$alsubj10[d$edqsub65=="DESIGN TECHNOLOGY"] <-19
d$alsubj10[d$edqsub65=="c.d.t"] <-19
d$alsubj10[d$edqsub65=="technology"] <-19
d$alsubj10[d$edqsub65=="Technology"] <-19
d$alsubj10[d$edqsub65=="DRAMA"] <-20
d$alsubj10[d$edqsub65=="Drama"] <-20
d$alsubj10[d$edqsub65=="drama and theatre arts"] <-20
d$alsubj10[d$edqsub65=="dance"] <-20
d$alsubj10[d$edqsub65=="Dance and Drama"] <-20
d$alsubj10[d$edqsub65=="ECCONOMICS"] <-21
d$alsubj10[d$edqsub65=="ecomics"] <-21
d$alsubj10[d$edqsub65=="ECOMICS"] <-21
d$alsubj10[d$edqsub65=="ecomincs"] <-21
d$alsubj10[d$edqsub65=="Ecomonics"] <-21
d$alsubj10[d$edqsub65=="ecomopmics"] <-21
d$alsubj10[d$edqsub65=="econ"] <-21
d$alsubj10[d$edqsub65=="ECON"] <-21
d$alsubj10[d$edqsub65=="ECONIICS"] <-21
d$alsubj10[d$edqsub65=="Econimics"] <-21
d$alsubj10[d$edqsub65=="econimics"] <-21
d$alsubj10[d$edqsub65=="Econimins"] <-21
d$alsubj10[d$edqsub65=="Econmics"] <-21
d$alsubj10[d$edqsub65=="econo;mics"] <-21
d$alsubj10[d$edqsub65=="ECONOMIC"] <-21
d$alsubj10[d$edqsub65=="Economic"] <-21
d$alsubj10[d$edqsub65=="economic and social histo"] <-21
d$alsubj10[d$edqsub65=="economices"] <-21
d$alsubj10[d$edqsub65=="economics"] <-21
d$alsubj10[d$edqsub65=="Economics"] <-21
d$alsubj10[d$edqsub65=="ECONOMICS"] <-21
d$alsubj10[d$edqsub65=="economics & politics"] <-21
d$alsubj10[d$edqsub65=="Economics & World Affairs"] <-21
d$alsubj10[d$edqsub65=="economics with politics"] <-21
d$alsubj10[d$edqsub65=="economicse"] <-21
d$alsubj10[d$edqsub65=="economis and world affair"] <-21
d$alsubj10[d$edqsub65=="Ecvonomics"] <-21
d$alsubj10[d$edqsub65=="encominics"] <-21
d$alsubj10[d$edqsub65=="ECONOMICS AT S LEVEL"] <-22
d$alsubj10[d$edqsub65=="Electronic Systems"] <-23
d$alsubj10[d$edqsub65=="ELECTRONIC\S#"] <-23
d$alsubj10[d$edqsub65=="eLECTRONICS"] <-23
d$alsubj10[d$edqsub65=="Electronics"] <-23
d$alsubj10[d$edqsub65=="electronics"] <-23
d$alsubj10[d$edqsub65=="ELECTRONICS"] <-23
d$alsubj10[d$edqsub65=="Electronics"] <-23
d$alsubj10[d$edqsub65=="electronics/statistics"] <-23
d$alsubj10[d$edqsub65=="microelectronics"] <-23
d$alsubj10[d$edqsub65=="ENGINEERING"] <-24
d$alsubj10[d$edqsub65=="ENGINEERING DRAWING"] <-24
d$alsubj10[d$edqsub65=="Engineering Drawing"] <-24
d$alsubj10[d$edqsub65=="Engineering drawing"] <-24
d$alsubj10[d$edqsub65=="engineering drawing"] <-24
d$alsubj10[d$edqsub65=="ENGINEERING DRAWING AND D"] <-24
d$alsubj10[d$edqsub65=="ENGINEERING METALWORK"] <-24
d$alsubj10[d$edqsub65=="ENGINEERING SCIENCE"] <-24
d$alsubj10[d$edqsub65=="Geometric and Engineering"] <-24
d$alsubj10[d$edqsub65=="combined english"] <-25
d$alsubj10[d$edqsub65=="ebglish"] <-25
d$alsubj10[d$edqsub65=="En g Lit"] <-25
d$alsubj10[d$edqsub65=="eng"] <-25
d$alsubj10[d$edqsub65=="ENG"] <-25
d$alsubj10[d$edqsub65=="ENG .LIT"] <-25
d$alsubj10[d$edqsub65=="eng lang"] <-25
d$alsubj10[d$edqsub65=="ENG LANG"] <-25
d$alsubj10[d$edqsub65=="Eng Lang"] <-25
d$alsubj10[d$edqsub65=="eng language/literature"] <-25
d$alsubj10[d$edqsub65=="ENG LIT"] <-25
d$alsubj10[d$edqsub65=="eng lit"] <-25
d$alsubj10[d$edqsub65=="Eng lit"] <-25
d$alsubj10[d$edqsub65=="eng lit."] <-25
d$alsubj10[d$edqsub65=="eng Slevel"] <-25
d$alsubj10[d$edqsub65=="Eng. Lit"] <-25
d$alsubj10[d$edqsub65=="ENG. LIT"] <-25
d$alsubj10[d$edqsub65=="Eng. Lit."] <-25
d$alsubj10[d$edqsub65=="ENG.LIT 1"] <-25
d$alsubj10[d$edqsub65=="eng.lit."] <-25
d$alsubj10[d$edqsub65=="eng/language."] <-25
d$alsubj10[d$edqsub65=="engl"] <-25
d$alsubj10[d$edqsub65=="English"] <-25
d$alsubj10[d$edqsub65=="ENGLISH"] <-25
d$alsubj10[d$edqsub65=="english"] <-25
d$alsubj10[d$edqsub65=="English  lit."] <-25
d$alsubj10[d$edqsub65=="English  lit."] <-25
d$alsubj10[d$edqsub65=="English (Literature)"] <-25
d$alsubj10[d$edqsub65=="ENGLISH ;LITERATURE"] <-25
d$alsubj10[d$edqsub65=="ENGLISH LANG"] <-25
d$alsubj10[d$edqsub65=="english lang"] <-25
d$alsubj10[d$edqsub65=="ENGLISH LANG & LIT"] <-25
d$alsubj10[d$edqsub65=="English Lang and Lit"] <-25
d$alsubj10[d$edqsub65=="English Lang."] <-25
d$alsubj10[d$edqsub65=="english lang.& lit."] <-25
d$alsubj10[d$edqsub65=="English lang/lit"] <-25
d$alsubj10[d$edqsub65=="ENGLISH LANG/LIT"] <-25
d$alsubj10[d$edqsub65=="english language"] <-25
d$alsubj10[d$edqsub65=="English Language"] <-25
d$alsubj10[d$edqsub65=="english language"] <-25
d$alsubj10[d$edqsub65=="ENGLISH LANGUAGE"] <-25
d$alsubj10[d$edqsub65=="English language"] <-25
d$alsubj10[d$edqsub65=="english Language"] <-25
d$alsubj10[d$edqsub65=="English language & Litera"] <-25
d$alsubj10[d$edqsub65=="english language & litera"] <-25
d$alsubj10[d$edqsub65=="ENGLISH LANGUAGE AND LIT"] <-25
d$alsubj10[d$edqsub65=="ENGLISH LANGUAGE AND LITE"] <-25
d$alsubj10[d$edqsub65=="english language/literatu"] <-25
d$alsubj10[d$edqsub65=="english lit"] <-25
d$alsubj10[d$edqsub65=="ENGLISH LIT"] <-25
d$alsubj10[d$edqsub65=="English Lit"] <-25
d$alsubj10[d$edqsub65=="english lit and lang"] <-25
d$alsubj10[d$edqsub65=="ENGLISH LIT AND LANGUAGE"] <-25
d$alsubj10[d$edqsub65=="english lit."] <-25
d$alsubj10[d$edqsub65=="English lit."] <-25
d$alsubj10[d$edqsub65=="ENGLISH LIT."] <-25
d$alsubj10[d$edqsub65=="English lit/lang"] <-25
d$alsubj10[d$edqsub65=="english litand language"] <-25
d$alsubj10[d$edqsub65=="english litature"] <-25
d$alsubj10[d$edqsub65=="ENGLISH LITERATURE"] <-25
d$alsubj10[d$edqsub65=="English Literature"] <-25
d$alsubj10[d$edqsub65=="english literature"] <-25
d$alsubj10[d$edqsub65=="English literature"] <-25
d$alsubj10[d$edqsub65=="English Literature & Lang"] <-25
d$alsubj10[d$edqsub65=="ENGLISH LITERATURE & LANG"] <-25
d$alsubj10[d$edqsub65=="English Literature/Lang."] <-25
d$alsubj10[d$edqsub65=="English Litereature"] <-25
d$alsubj10[d$edqsub65=="ENGLISH LITERTURA"] <-25
d$alsubj10[d$edqsub65=="English Litterature"] <-25
d$alsubj10[d$edqsub65=="english not specific"] <-25
d$alsubj10[d$edqsub65=="ENLISH"] <-25
d$alsubj10[d$edqsub65=="ENLISH LANGUAGE/LITERATUR"] <-25
d$alsubj10[d$edqsub65=="Environmental Sc"] <-62
d$alsubj10[d$edqsub65=="environmental science"] <-62
d$alsubj10[d$edqsub65=="Environmental Studies"] <-62
d$alsubj10[d$edqsub65=="Fashion"] <-52
d$alsubj10[d$edqsub65=="fashion"] <-52
d$alsubj10[d$edqsub65=="Fashion & textiles"] <-52
d$alsubj10[d$edqsub65=="fashion and design"] <-52
d$alsubj10[d$edqsub65=="fashion and fabric"] <-52
d$alsubj10[d$edqsub65=="Fashion design"] <-52
d$alsubj10[d$edqsub65=="film studies"] <-26
d$alsubj10[d$edqsub65=="FILM STUDIES"] <-26
d$alsubj10[d$edqsub65=="freanch"] <-27
d$alsubj10[d$edqsub65=="frech"	] <-27
d$alsubj10[d$edqsub65=="FRENCH"] <-27
d$alsubj10[d$edqsub65=="french"] <-27
d$alsubj10[d$edqsub65=="French"] <-27
d$alsubj10[d$edqsub65=="french for business"] <-27
d$alsubj10[d$edqsub65=="french lang"] <-27		
d$alsubj10[d$edqsub65=="French Literature"] <-27
d$alsubj10[d$edqsub65=="FRENCH1"] <-27
d$alsubj10[d$edqsub65=="French S level"] <-28
d$alsubj10[d$edqsub65=="Furhther Maths"] <-29
d$alsubj10[d$edqsub65=="further math"] <-29
d$alsubj10[d$edqsub65=="further mathematics"] <-29
d$alsubj10[d$edqsub65=="Further mathematics"] <-29
d$alsubj10[d$edqsub65=="FURTHER MATHEMATICS"] <-29
d$alsubj10[d$edqsub65=="Further Mathematics"] <-29
d$alsubj10[d$edqsub65=="further maths"] <-29
d$alsubj10[d$edqsub65=="Further Maths"] <-29
d$alsubj10[d$edqsub65=="Futher maths"] <-29
d$alsubj10[d$edqsub65=="FURTHER MATHS"] <-29
d$alsubj10[d$edqsub65=="FURTHER MATH"] <-29
d$alsubj10[d$edqsub65=="Further Maths - Pure and"] <-29
d$alsubj10[d$edqsub65=="FURTHER MATHS A LEVEL"] <-29
d$alsubj10[d$edqsub65=="FUTHER MATHS"] <-29
d$alsubj10[d$edqsub65=="further maths (s)"] <-30
d$alsubj10[d$edqsub65=="FURTHER MATHS S LEVEL"] <-30
d$alsubj10[d$edqsub65=="FURTHER MATHS STEP"] <-30
d$alsubj10[d$edqsub65=="S level further maths"] <-30
d$alsubj10[d$edqsub65=="GEN STUD"] <-31
d$alsubj10[d$edqsub65=="gen stud"] <-31
d$alsubj10[d$edqsub65=="gen studies"] <-31
d$alsubj10[d$edqsub65=="GEN STUDIES"] <-31
d$alsubj10[d$edqsub65=="Gen studies"] <-31
d$alsubj10[d$edqsub65=="Gen Studies"] <-31
d$alsubj10[d$edqsub65=="GEN STUDIES RELIGIOUS STU"] <-31
d$alsubj10[d$edqsub65=="gen. studies"] <-31
d$alsubj10[d$edqsub65=="gen.studies"] <-31
d$alsubj10[d$edqsub65=="general"] <-31
d$alsubj10[d$edqsub65=="GENERAL"] <-31
d$alsubj10[d$edqsub65=="general   studies"] <-31
d$alsubj10[d$edqsub65=="general  tudies"] <-31
d$alsubj10[d$edqsub65=="general knowl;edfge"] <-31
d$alsubj10[d$edqsub65=="GENERAL STIUDIES"] <-31
d$alsubj10[d$edqsub65=="GENERAL STUDIES"] <-31
d$alsubj10[d$edqsub65=="general studies"] <-31
d$alsubj10[d$edqsub65=="General studies"] <-31
d$alsubj10[d$edqsub65=="General Studies"] <-31
d$alsubj10[d$edqsub65=="GENERAL STUDY"] <-31
d$alsubj10[d$edqsub65=="general study"] <-31
d$alsubj10[d$edqsub65=="general studys"] <-31
d$alsubj10[d$edqsub65=="Genereal Studies"] <-31
d$alsubj10[d$edqsub65=="genstudies"] <-31
d$alsubj10[d$edqsub65=="1GEOGRAPHY"] <-32
d$alsubj10[d$edqsub65=="gegraphy"] <-32
d$alsubj10[d$edqsub65=="GEGRAPHY"] <-32
d$alsubj10[d$edqsub65=="geoagraphy"] <-32
d$alsubj10[d$edqsub65=="geog"] <-32
d$alsubj10[d$edqsub65=="Geog"] <-32
d$alsubj10[d$edqsub65=="GEOG"] <-32
d$alsubj10[d$edqsub65=="GEOGHRAY"] <-32
d$alsubj10[d$edqsub65=="geogr"] <-32
d$alsubj10[d$edqsub65=="GEOGRAGHY"] <-32
d$alsubj10[d$edqsub65=="GEOGRAHY"] <-32
d$alsubj10[d$edqsub65=="geographt"] <-32
d$alsubj10[d$edqsub65=="GEOGRAPHY"] <-32
d$alsubj10[d$edqsub65=="Geography"] <-32
d$alsubj10[d$edqsub65=="geography"] <-32
d$alsubj10[d$edqsub65=="geography grade d"] <-32
d$alsubj10[d$edqsub65=="geographyy"] <-32
d$alsubj10[d$edqsub65=="geograqphy"] <-32
d$alsubj10[d$edqsub65=="geophraphy"] <-32
d$alsubj10[d$edqsub65=="gepgraphy"] <-32
d$alsubj10[d$edqsub65=="GOEG"] <-32
d$alsubj10[d$edqsub65=="goegraphy"] <-32
d$alsubj10[d$edqsub65=="goegraphy"] <-32
d$alsubj10[d$edqsub65=="geog   s level"] <-33
d$alsubj10[d$edqsub65=="geog s level"] <-33
d$alsubj10[d$edqsub65=="GEOGRAPHY S LEVEL"] <-33
d$alsubj10[d$edqsub65=="geography s level"] <-33
d$alsubj10[d$edqsub65=="geology"] <-34
d$alsubj10[d$edqsub65=="Geology"] <-34
d$alsubj10[d$edqsub65=="GEOLOGY"] <-34
d$alsubj10[d$edqsub65=="German"] <-35
d$alsubj10[d$edqsub65=="german"] <-35
d$alsubj10[d$edqsub65=="GERMAN"] <-35
d$alsubj10[d$edqsub65=="German S level"] <-35
d$alsubj10[d$edqsub65=="German."] <-35
d$alsubj10[d$edqsub65=="gevernment politics"] <-36
d$alsubj10[d$edqsub65=="govenment and politics"] <-36
d$alsubj10[d$edqsub65=="GOVERNMENT"] <-36
d$alsubj10[d$edqsub65=="Government & politics"] <-36
d$alsubj10[d$edqsub65=="GOVERNMENT & POLITICS"] <-36
d$alsubj10[d$edqsub65=="GOVERNMENT & POLITICS"] <-36
d$alsubj10[d$edqsub65=="GOVERNMENT AND POLITICAL"] <-36
d$alsubj10[d$edqsub65=="GOVERNMENT AND POLITICS"] <-36
d$alsubj10[d$edqsub65=="government and politics"] <-36
d$alsubj10[d$edqsub65=="Government and Politics"] <-36
d$alsubj10[d$edqsub65=="GOVERNMENT POLITICS"] <-36
d$alsubj10[d$edqsub65=="governmental politics"] <-36
d$alsubj10[d$edqsub65=="Govrnment and politics"] <-36
d$alsubj10[d$edqsub65=="Govt and politics"] <-36
d$alsubj10[d$edqsub65=="GOVT AND POLITICS"] <-36
d$alsubj10[d$edqsub65=="GOVT. AND POLITICS"] <-36
d$alsubj10[d$edqsub65=="govt/politics"] <-36
d$alsubj10[d$edqsub65=="GRAPHIC \DESIGN"] <-37
d$alsubj10[d$edqsub65=="GRAPHIC DESIGN"] <-37
d$alsubj10[d$edqsub65=="Graphic Design"] <-37
d$alsubj10[d$edqsub65=="graphic design"] <-37
d$alsubj10[d$edqsub65=="graphical communication"] <-37
d$alsubj10[d$edqsub65=="Graphical communication"] <-37
d$alsubj10[d$edqsub65=="gre ke"] <-38
d$alsubj10[d$edqsub65=="GREEK"] <-38
d$alsubj10[d$edqsub65=="greek"] <-38
d$alsubj10[d$edqsub65== "MODERN GREEK"] <-38
d$alsubj10[d$edqsub65==";history"] <-39
d$alsubj10[d$edqsub65=="19 centuary british and e"] <-39
d$alsubj10[d$edqsub65=="American History"] <-39
d$alsubj10[d$edqsub65=="HIDTORY"] <-39
d$alsubj10[d$edqsub65=="hist"] <-39
d$alsubj10[d$edqsub65=="History"] <-39
d$alsubj10[d$edqsub65=="HISTORY"] <-39
d$alsubj10[d$edqsub65=="history"] <-39
d$alsubj10[d$edqsub65=="History (modern)"] <-39
d$alsubj10[d$edqsub65=="History."] <-39
d$alsubj10[d$edqsub65=="Histoy"] <-39
d$alsubj10[d$edqsub65=="histroy"] <-39
d$alsubj10[d$edqsub65=="medeaevil history"] <-39
d$alsubj10[d$edqsub65=="MEDIEVAL HISTORY"] <-39
d$alsubj10[d$edqsub65=="MODERN HISTORY"] <-39
d$alsubj10[d$edqsub65=="Social & Economic History"] <-39
d$alsubj10[d$edqsub65=="Social and economic histo"] <-39
d$alsubj10[d$edqsub65=="HISTORY S LEVEL"] <-40
d$alsubj10[d$edqsub65=="history S level"] <-40
d$alsubj10[d$edqsub65=="hum,an bilogy"] <-62
d$alsubj10[d$edqsub65=="human  biology"] <-62
d$alsubj10[d$edqsub65=="human biology"] <-62
d$alsubj10[d$edqsub65=="Human biology"] <-62
d$alsubj10[d$edqsub65=="Human Biology"] <-62
d$alsubj10[d$edqsub65=="human physiology"] <-62
d$alsubj10[d$edqsub65=="HUMAN BIOLOGY"] <-62
d$alsubj10[d$edqsub65=="HUMAN PHYSIOLOGY"] <-62
d$alsubj10[d$edqsub65=="humanbiology"] <-62
d$alsubj10[d$edqsub65=="humanphysiology"] <-62
d$alsubj10[d$edqsub65=="industrila studies"] <-41
d$alsubj10[d$edqsub65=="Industrial Studies"] <-41
d$alsubj10[d$edqsub65=="Italian"] <-42
d$alsubj10[d$edqsub65=="LATIN"] <-43
d$alsubj10[d$edqsub65=="latin"] <-43
d$alsubj10[d$edqsub65=="Latin"] <-43
d$alsubj10[d$edqsub65=="Latin S level"] <-44
d$alsubj10[d$edqsub65=="latin s level"] <-44
d$alsubj10[d$edqsub65=="LATIN SPECIAL"] <-44
d$alsubj10[d$edqsub65=="English Law."] <-45
d$alsubj10[d$edqsub65=="criminal law"] <-45
d$alsubj10[d$edqsub65=="Law"] <-45
d$alsubj10[d$edqsub65=="law"] <-45
d$alsubj10[d$edqsub65=="LAW"] <-45
d$alsubj10[d$edqsub65=="low"] <-45
d$alsubj10[d$edqsub65=="applied and pure maths"] <-46
d$alsubj10[d$edqsub65=="Applied Mathematics"] <-46
d$alsubj10[d$edqsub65=="applied mathematics"] <-46
d$alsubj10[d$edqsub65=="APPLIED MATHS"] <-46
d$alsubj10[d$edqsub65=="applied maths"] <-46
d$alsubj10[d$edqsub65=="Applied Maths"] <-46
d$alsubj10[d$edqsub65=="combined maths"] <-46
d$alsubj10[d$edqsub65=="Maaths"] <-46
d$alsubj10[d$edqsub65=="Matematics"] <-46
d$alsubj10[d$edqsub65=="MATH"] <-46
d$alsubj10[d$edqsub65=="math"] <-46
d$alsubj10[d$edqsub65=="Math & General knowladge"] <-46
d$alsubj10[d$edqsub65=="Mathematics"] <-46
d$alsubj10[d$edqsub65=="mATHEMATICS"] <-46
d$alsubj10[d$edqsub65=="MATHEMATICS"] <-46
d$alsubj10[d$edqsub65=="mathematics"] <-46
d$alsubj10[d$edqsub65=="MATHEMATICS - PURE/APLIED"] <-46
d$alsubj10[d$edqsub65=="mathematics and art"] <-46
d$alsubj10[d$edqsub65=="Mathematics and Statistic"] <-46
d$alsubj10[d$edqsub65=="Mathematics with stats"] <-46
d$alsubj10[d$edqsub65=="mathematics, pure and app"] <-46
d$alsubj10[d$edqsub65=="MATHMATICS AND STATISTICS"] <-46
d$alsubj10[d$edqsub65=="Maths"] <-46
d$alsubj10[d$edqsub65=="maths"] <-46
d$alsubj10[d$edqsub65=="MATHS"] <-46
d$alsubj10[d$edqsub65=="maths & mechanics"] <-46
d$alsubj10[d$edqsub65=="Maths & Statistics"] <-46
d$alsubj10[d$edqsub65=="maths & statistics"] <-46
d$alsubj10[d$edqsub65=="Maths (pure and Applied)"] <-46
d$alsubj10[d$edqsub65=="Maths /pure and applied"] <-46
d$alsubj10[d$edqsub65=="maths + stats"] <-46
d$alsubj10[d$edqsub65=="MATHS A LEVEL"] <-46
d$alsubj10[d$edqsub65=="maths an"] <-46
d$alsubj10[d$edqsub65=="MATHS AND STATISTICS"] <-46
d$alsubj10[d$edqsub65=="maths and statistics"] <-46
d$alsubj10[d$edqsub65=="Maths and stats"] <-46
d$alsubj10[d$edqsub65=="MATHS AND STATS"] <-46
d$alsubj10[d$edqsub65=="maths AS"] <-46
d$alsubj10[d$edqsub65=="maths pure"] <-46
d$alsubj10[d$edqsub65=="maths pure and applied"] <-46
d$alsubj10[d$edqsub65=="MATHS- PURE AND APPLIED"] <-46
d$alsubj10[d$edqsub65=="Maths pure l& applied"] <-46
d$alsubj10[d$edqsub65=="MATHS S LEVEL"] <-46
d$alsubj10[d$edqsub65=="MATHS WITH STATISTICS"] <-46
d$alsubj10[d$edqsub65=="maths with statistics"] <-46
d$alsubj10[d$edqsub65=="maths with stats"] <-46
d$alsubj10[d$edqsub65=="Maths with stats."] <-46
d$alsubj10[d$edqsub65=="MATHS, PURE AND APPLIED"] <-46
d$alsubj10[d$edqsub65=="maths."] <-46
d$alsubj10[d$edqsub65=="MATHS."] <-46
d$alsubj10[d$edqsub65=="Maths."] <-46
d$alsubj10[d$edqsub65=="Maths/pure and applied"] <-46
d$alsubj10[d$edqsub65=="Maths/Statistics"] <-46
d$alsubj10[d$edqsub65=="MATHSW"] <-46
d$alsubj10[d$edqsub65=="Mathsw"] <-46
d$alsubj10[d$edqsub65=="mechanics"] <-46
d$alsubj10[d$edqsub65=="MMaths"] <-46
d$alsubj10[d$edqsub65=="PURE & APPL MATHS"] <-46
d$alsubj10[d$edqsub65=="Pure & Applied Maths"] <-46
d$alsubj10[d$edqsub65=="pure and applied maths"] <-46
d$alsubj10[d$edqsub65=="PURE AND APPLIED MATHS"] <-46
d$alsubj10[d$edqsub65=="Pure M aths & Statistics"] <-46
d$alsubj10[d$edqsub65=="pure mathematics"] <-46
d$alsubj10[d$edqsub65=="PURE MATHEMATICS"] <-46
d$alsubj10[d$edqsub65=="pure mathematics"] <-46
d$alsubj10[d$edqsub65=="pure maths"] <-46
d$alsubj10[d$edqsub65=="PURE MATHS"] <-46
d$alsubj10[d$edqsub65=="Pure maths"] <-46
d$alsubj10[d$edqsub65=="Pure Maths"] <-46
d$alsubj10[d$edqsub65=="Pure Maths & Mechanics"] <-46
d$alsubj10[d$edqsub65=="Pure Maths & Statistics"] <-46
d$alsubj10[d$edqsub65=="Pure Maths & Stats"] <-46
d$alsubj10[d$edqsub65=="pure maths and statistics"] <-46
d$alsubj10[d$edqsub65=="PURE MATHS AND STATISTICS"] <-46
d$alsubj10[d$edqsub65=="PURE MATHS AND STATS"] <-46
d$alsubj10[d$edqsub65=="pure maths and stats"] <-46
d$alsubj10[d$edqsub65=="PURE MATHS WITH STATISTIC"] <-46
d$alsubj10[d$edqsub65=="pure maths with statistic"] <-46
d$alsubj10[d$edqsub65=="Pure maths with stats"] <-46
d$alsubj10[d$edqsub65=="PURE MATHS WITH STATS"] <-46
d$alsubj10[d$edqsub65=="pure maths with stats."] <-46
d$alsubj10[d$edqsub65=="pure maths witih stats."] <-46
d$alsubj10[d$edqsub65=="pure maths/statistics"] <-46
d$alsubj10[d$edqsub65=="pure/statistal maths"] <-46
d$alsubj10[d$edqsub65=="stastics"] <-46
d$alsubj10[d$edqsub65=="statisics"] <-46
d$alsubj10[d$edqsub65=="STATISTICS"] <-46
d$alsubj10[d$edqsub65=="statistics"] <-46
d$alsubj10[d$edqsub65=="Statistics"] <-46
d$alsubj10[d$edqsub65=="stats"] <-46
d$alsubj10[d$edqsub65=="STATS"] <-46
d$alsubj10[d$edqsub65=="Applied Maths S level"] <-47
d$alsubj10[d$edqsub65=="Maths S/level"] <-46
d$alsubj10[d$edqsub65=="S level maths"] <-46
d$alsubj10[d$edqsub65=="s' level maths"] <-46
d$alsubj10[d$edqsub65=="Step maths"] <-46
d$alsubj10[d$edqsub65=="MEDIA"] <-48
d$alsubj10[d$edqsub65=="Media studies"] <-48
d$alsubj10[d$edqsub65=="music"] <-49
d$alsubj10[d$edqsub65=="Music"] <-49
d$alsubj10[d$edqsub65=="MUSIC"] <-49
d$alsubj10[d$edqsub65=="music practical"] <-49
d$alsubj10[d$edqsub65=="music theory"] <-49
d$alsubj10[d$edqsub65=="Practical music"] <-49
d$alsubj10[d$edqsub65=="Rudiments of Music"] <-49
d$alsubj10[d$edqsub65=="STAGE DECOR AND COSTUME D"] <-50
d$alsubj10[d$edqsub65=="FINANCIAL CONTROL"] <-50
d$alsubj10[d$edqsub65=="ceramics"] <-51
d$alsubj10[d$edqsub65=="CRAFT"] <-51
d$alsubj10[d$edqsub65=="CRAFT DESIGN & THEATRE ST"] <-51
d$alsubj10[d$edqsub65=="POTTERY"] <-51
d$alsubj10[d$edqsub65=="printing"] <-52
d$alsubj10[d$edqsub65=="TEXTILE AND DRESS"] <-52
d$alsubj10[d$edqsub65=="DRESS"] <-52
d$alsubj10[d$edqsub65=="dress and design"] <-52
d$alsubj10[d$edqsub65=="FOOD AND NUTRITION"] <-52
d$alsubj10[d$edqsub65=="food and nutrition"] <-52
d$alsubj10[d$edqsub65=="home econimics"] <-52
d$alsubj10[d$edqsub65=="home economic"] <-52
d$alsubj10[d$edqsub65=="HOME ECONOMICS"] <-52
d$alsubj10[d$edqsub65=="Home Economics"] <-52
d$alsubj10[d$edqsub65=="home economics"] <-52
d$alsubj10[d$edqsub65=="home economics - sewing"] <-52
d$alsubj10[d$edqsub65=="Home economics."] <-52
d$alsubj10[d$edqsub65=="HOME, FAMILY AND SOCIETY"] <-52
d$alsubj10[d$edqsub65=="HOME, FAMILY AND SOCIETY"] <-52
d$alsubj10[d$edqsub65=="CONFECTIONERY TECHNOLOGY"] <-52
d$alsubj10[d$edqsub65=="cookery"] <-52
d$alsubj10[d$edqsub65=="COOKERY"] <-52
d$alsubj10[d$edqsub65=="Domestic Science"] <-52
d$alsubj10[d$edqsub65=="surveying"] <-52
d$alsubj10[d$edqsub65=="tech drawing"] <-52
d$alsubj10[d$edqsub65=="TECH DRAWING"] <-52
d$alsubj10[d$edqsub65=="tech drawing"] <-52
d$alsubj10[d$edqsub65=="TECHNICAL DRAWING"] <-52
d$alsubj10[d$edqsub65=="technical drawing"] <-52
d$alsubj10[d$edqsub65=="Technical DRawing"] <-52
d$alsubj10[d$edqsub65=="technical drawing"] <-52
d$alsubj10[d$edqsub65=="Technical Drawing"] <-52
d$alsubj10[d$edqsub65=="BUILDING CONSTRUCTION"] <-52
d$alsubj10[d$edqsub65=="building construction"] <-52
d$alsubj10[d$edqsub65=="Needlework"] <-52
d$alsubj10[d$edqsub65== "stage craft and design"] <-52
d$alsubj10[d$edqsub65=="SECIENE"] <-62
d$alsubj10[d$edqsub65=="Health Scencie"] <-62
d$alsubj10[d$edqsub65=="HEALTH STUDIES"] <-62
d$alsubj10[d$edqsub65=="Science in Society"] <-62
d$alsubj10[d$edqsub65=="philosophy"] <-54
d$alsubj10[d$edqsub65=="Philosophy"] <-54
d$alsubj10[d$edqsub65=="PHILOSOPHY"] <-54
d$alsubj10[d$edqsub65=="philosphy"] <-54
d$alsubj10[d$edqsub65=="phisics"] <-56
d$alsubj10[d$edqsub65=="PHOTOGRAPHY"] <-55
d$alsubj10[d$edqsub65=="photography"] <-55
d$alsubj10[d$edqsub65=="physical education"] <-68
d$alsubj10[d$edqsub65=="PHYSICAL EDUCATION"] <-68
d$alsubj10[d$edqsub65=="HPYSICS"] <-56
d$alsubj10[d$edqsub65=="PHSICS"] <-56
d$alsubj10[d$edqsub65=="phsics"] <-56
d$alsubj10[d$edqsub65=="phsyics"] <-56
d$alsubj10[d$edqsub65=="phycics"] <-56
d$alsubj10[d$edqsub65=="PHYS"] <-56
d$alsubj10[d$edqsub65=="phys/  maths"] <-56
d$alsubj10[d$edqsub65=="PHYSIC"] <-56
d$alsubj10[d$edqsub65=="PHYSICA"] <-56
d$alsubj10[d$edqsub65=="Physiccs"] <-56
d$alsubj10[d$edqsub65=="Physics"] <-56
d$alsubj10[d$edqsub65=="PHYSICS"] <-56
d$alsubj10[d$edqsub65=="physics"] <-56
d$alsubj10[d$edqsub65=="PHYSICS A LEVEL"] <-56
d$alsubj10[d$edqsub65=="PHYSICS WITH ELECTRONICS"] <-56
d$alsubj10[d$edqsub65=="Physics."] <-56
d$alsubj10[d$edqsub65=="PHYSYCS"] <-56
d$alsubj10[d$edqsub65=="pyschics"] <-56
d$alsubj10[d$edqsub65=="PYSICS"] <-56
d$alsubj10[d$edqsub65=="PHICS"] <-56
d$alsubj10[d$edqsub65=="physics (s)"] <-57
d$alsubj10[d$edqsub65=="Physics S/level"] <-57
d$alsubj10[d$edqsub65=="PHYSICS STEP"] <-57
d$alsubj10[d$edqsub65=="British and American Poli"] <-36
d$alsubj10[d$edqsub65=="BRITISH GOV AND POLITICS"] <-36
d$alsubj10[d$edqsub65=="BRITISH GOVERN AND POLITI"] <-36
d$alsubj10[d$edqsub65=="British government"] <-36
d$alsubj10[d$edqsub65=="british government and po"] <-36
d$alsubj10[d$edqsub65=="British Government l& Pol"] <-36
d$alsubj10[d$edqsub65=="British Govt and politics"] <-36
d$alsubj10[d$edqsub65=="polatics and government"] <-36
d$alsubj10[d$edqsub65=="POLICTICAL HISTORY"] <-36
d$alsubj10[d$edqsub65=="POLITICAL AND ECONOMIC ST"] <-36
d$alsubj10[d$edqsub65=="Political History"] <-36
d$alsubj10[d$edqsub65=="political History"] <-36
d$alsubj10[d$edqsub65=="political history"] <-36
d$alsubj10[d$edqsub65=="political science"] <-36
d$alsubj10[d$edqsub65=="Political Studies"] <-36
d$alsubj10[d$edqsub65=="political studiesd"] <-36
d$alsubj10[d$edqsub65=="politics"] <-36
d$alsubj10[d$edqsub65=="POLITICS"] <-36
d$alsubj10[d$edqsub65=="Politics"] <-36
d$alsubj10[d$edqsub65=="politics & economics"] <-36
d$alsubj10[d$edqsub65=="politics & government"] <-36
d$alsubj10[d$edqsub65=="politics and government"] <-36
d$alsubj10[d$edqsub65=="Politics."] <-36
d$alsubj10[d$edqsub65=="Phsychology"] <-59
d$alsubj10[d$edqsub65=="phsycology"] <-59
d$alsubj10[d$edqsub65=="phychology"] <-59
d$alsubj10[d$edqsub65=="PHYCOLOGY"] <-59
d$alsubj10[d$edqsub65=="phycology"] <-59
d$alsubj10[d$edqsub65=="physchology"] <-59
d$alsubj10[d$edqsub65=="Physchology"] <-59
d$alsubj10[d$edqsub65=="physclogy"] <-59
d$alsubj10[d$edqsub65=="Physco;ogy"] <-59
d$alsubj10[d$edqsub65=="PHYSCOLOGY"] <-59
d$alsubj10[d$edqsub65=="physology"] <-59
d$alsubj10[d$edqsub65=="pschology"] <-59
d$alsubj10[d$edqsub65=="pschology"] <-59
d$alsubj10[d$edqsub65=="pshycoclgy"] <-59
d$alsubj10[d$edqsub65=="PSYCHOLOGY"] <-59
d$alsubj10[d$edqsub65=="psychology"] <-59
d$alsubj10[d$edqsub65=="Psychology"] <-59
d$alsubj10[d$edqsub65=="Psycology"] <-59
d$alsubj10[d$edqsub65=="PSYCOLOGY"] <-59
d$alsubj10[d$edqsub65=="public affairs"] <-36
d$alsubj10[d$edqsub65=="PYSCOLOGY"] <-59
d$alsubj10[d$edqsub65=="Divinity"] <-60
d$alsubj10[d$edqsub65=="DIVINITY"] <-60
d$alsubj10[d$edqsub65=="r.e"] <-60
d$alsubj10[d$edqsub65=="R.E."] <-60
d$alsubj10[d$edqsub65=="R.e."] <-60
d$alsubj10[d$edqsub65=="RE"] <-60
d$alsubj10[d$edqsub65=="re"] <-60
d$alsubj10[d$edqsub65=="REL. STUDIES"] <-60
d$alsubj10[d$edqsub65=="relegious studies"] <-60
d$alsubj10[d$edqsub65=="philosi"] <-54
d$alsubj10[d$edqsub65=="RELIG STUDIES"] <-60
d$alsubj10[d$edqsub65=="religeous studies"] <-60
d$alsubj10[d$edqsub65=="religious education"] <-60
d$alsubj10[d$edqsub65=="Religious Education"] <-60
d$alsubj10[d$edqsub65=="RELIGIOUS EDUCATION"] <-60
d$alsubj10[d$edqsub65=="religious education"] <-60
d$alsubj10[d$edqsub65=="religious knowledge"] <-60
d$alsubj10[d$edqsub65=="religious studies"] <-60
d$alsubj10[d$edqsub65=="RELIGIOUS STUDIES"] <-60
d$alsubj10[d$edqsub65=="Religious studies"] <-60
d$alsubj10[d$edqsub65=="religous"] <-60
d$alsubj10[d$edqsub65=="Religous Education"] <-60
d$alsubj10[d$edqsub65=="scriptire"] <-60
d$alsubj10[d$edqsub65=="theology"] <-60
d$alsubj10[d$edqsub65=="russian"] <-61
d$alsubj10[d$edqsub65=="secretarial"] <-63
d$alsubj10[d$edqsub65=="SECRETARIAL"] <-63
d$alsubj10[d$edqsub65=="SECRETARIAL STUDIES"] <-63
d$alsubj10[d$edqsub65=="Secretarial studies"] <-63
d$alsubj10[d$edqsub65=="SOCIAL BIOLOGY"] <-62
d$alsubj10[d$edqsub65=="social biology"] <-62
d$alsubj10[d$edqsub65=="Social biology"] <-62
d$alsubj10[d$edqsub65=="Social Biology"] <-62
d$alsubj10[d$edqsub65=="SOCIAL POLICY ADMIN"] <-64
d$alsubj10[d$edqsub65=="SOCIAL POLICY"] <-64
d$alsubj10[d$edqsub65=="Social sciences"] <-65
d$alsubj10[d$edqsub65=="social studies"] <-65
d$alsubj10[d$edqsub65=="health and social care"] <-65
d$alsubj10[d$edqsub65=="SOCIALGY"] <-66
d$alsubj10[d$edqsub65=="socialogy"] <-66
d$alsubj10[d$edqsub65=="SOCIALOGY"] <-66
d$alsubj10[d$edqsub65=="Socialolgy"] <-66
d$alsubj10[d$edqsub65=="socialologu"] <-66
d$alsubj10[d$edqsub65=="Socialology"] <-66
d$alsubj10[d$edqsub65=="SOCIOLGY"] <-66
d$alsubj10[d$edqsub65=="socioligy"] <-66
d$alsubj10[d$edqsub65=="sociolocy"] <-66
d$alsubj10[d$edqsub65=="SOCIOLOGOY"] <-66
d$alsubj10[d$edqsub65=="SOCIOLOGY"] <-66
d$alsubj10[d$edqsub65=="Sociology"] <-66
d$alsubj10[d$edqsub65=="sociology"] <-66
d$alsubj10[d$edqsub65=="SOCIOPLOGY"] <-66
d$alsubj10[d$edqsub65=="spanish"] <-67
d$alsubj10[d$edqsub65=="Spanish"] <-67
d$alsubj10[d$edqsub65=="SPANISH"] <-67
d$alsubj10[d$edqsub65=="spannish"] <-67
d$alsubj10[d$edqsub65=="sports studies"] <-68
d$alsubj10[d$edqsub65=="SPORTS STUDIES"] <-68
d$alsubj10[d$edqsub65=="Sports Studies"] <-68
d$alsubj10[d$edqsub65=="theater studies"] <-69
d$alsubj10[d$edqsub65=="Theatre Arts"] <-69
d$alsubj10[d$edqsub65=="THEATRE STUDIEAS"] <-69
d$alsubj10[d$edqsub65=="theatre studies"] <-69
d$alsubj10[d$edqsub65=="Theatre studies"] <-69
d$alsubj10[d$edqsub65=="Theatre Studies"] <-69
d$alsubj10[d$edqsub65=="THEATRE STUDIES"] <-69
d$alsubj10[d$edqsub65=="theatre studys"] <-69
d$alsubj10[d$edqsub65=="theatre stuides"] <-69
d$alsubj10[d$edqsub65=="Urban Studies"] <-51
d$alsubj10[d$edqsub65=="Urdu"] <-70
d$alsubj10[d$edqsub65=="welsh"] <-71
d$alsubj10[d$edqsub65=="WELSH"] <-71
d$alsubj10[d$edqsub65=="war and society"] <-51
d$alsubj10[d$edqsub65=="ZOOLOGY"] <-62
d$alsubj10[d$edqsub65=="zoology"] <-62
d$alsubj10[d$edqsub65=="MANAGEMENT"] <-51
d$alsubj10[d$edqsub65=="modern studies"] <-51
d$alsubj10[d$edqsub65=="MODERN STUDIES"] <-51

# Mathematics and Computing

# Mathematics
d$mathematics<-NA
d$mathematics[d$obs30==1] <- 0
d$mathematics[d$alsubj1==29] <-1
d$mathematics[d$alsubj1==30] <-1
d$mathematics[d$alsubj1==46] <-1
d$mathematics[d$alsubj1==47] <-1
d$mathematics[d$alsubj2==29] <-1
d$mathematics[d$alsubj2==30] <-1
d$mathematics[d$alsubj2==46] <-1 
d$mathematics[d$alsubj2==47] <-1
d$mathematics[d$alsubj3==29] <-1
d$mathematics[d$alsubj3==30] <-1
d$mathematics[d$alsubj3==46] <-1 
d$mathematics[d$alsubj3==47] <-1
d$mathematics[d$alsubj4==29] <-1
d$mathematics[d$alsubj4==30] <-1
d$mathematics[d$alsubj4==46] <-1
d$mathematics[d$alsubj4==47] <-1
d$mathematics[d$alsubj5==29] <-1
d$mathematics[d$alsubj5==30] <-1
d$mathematics[d$alsubj5==46] <-1
d$mathematics[d$alsubj5==47] <-1
d$mathematics[d$alsubj6==29] <-1
d$mathematics[d$alsubj6==30] <-1
d$mathematics[d$alsubj6==46] <-1 
d$mathematics[d$alsubj6==47] <-1
d$mathematics[d$alsubj7==29] <-1
d$mathematics[d$alsubj7==30] <-1
d$mathematics[d$alsubj7==46] <-1 
d$mathematics[d$alsubj7==47] <-1
d$mathematics[d$alsubj8==29] <-1
d$mathematics[d$alsubj8==30] <-1
d$mathematics[d$alsubj8==46] <-1 
d$mathematics[d$alsubj8==47] <-1
d$mathematics[d$alsubj9==29] <-1
d$mathematics[d$alsubj9==30] <-1
d$mathematics[d$alsubj9==46] <-1 
d$mathematics[d$alsubj9==47] <-1
d$mathematics[d$alsubj10==29] <-1
d$mathematics[d$alsubj10==30] <-1
d$mathematics[d$alsubj10==46] <-1
d$mathematics[d$alsubj10==47] <-1


#Incorporation of Computing into Maths A-level qualification

d$mathematics[d$alsubj1==17] <-1
d$mathematics[d$alsubj1==18] <-1
d$mathematics[d$alsubj2==17] <-1
d$mathematics[d$alsubj2==18] <-1
d$mathematics[d$alsubj3==17] <-1
d$mathematics[d$alsubj3==18] <-1
d$mathematics[d$alsubj4==17] <-1
d$mathematics[d$alsubj4==18] <-1
d$mathematics[d$alsubj5==17] <-1
d$mathematics[d$alsubj5==18] <-1
d$mathematics[d$alsubj6==17] <-1
d$mathematics[d$alsubj6==18] <-1
d$mathematics[d$alsubj7==17] <-1
d$mathematics[d$alsubj7==18] <-1
d$mathematics[d$alsubj8==17] <-1
d$mathematics[d$alsubj8==18] <-1
d$mathematics[d$alsubj9==17] <-1
d$mathematics[d$alsubj9==18] <-1
d$mathematics[d$alsubj10==17] <-1
d$mathematics[d$alsubj10==18] <-1

#Science A level	
d$science<-NA
d$science[d$obs30==1] <- 0
d$science[d$alsubj1==8] <-1
d$science[d$alsubj1==9] <-1
d$science[d$alsubj1==10] <-1
d$science[d$alsubj1==12] <-1
d$science[d$alsubj1==13] <-1
d$science[d$alsubj1==34] <-1
d$science[d$alsubj1==56] <-1
d$science[d$alsubj1==57] <-1
d$science[d$alsubj1==62] <-1
d$science[d$alsubj1==72] <-1
d$science[d$alsubj2==8] <-1
d$science[d$alsubj2==9] <-1
d$science[d$alsubj2==10] <-1
d$science[d$alsubj2==12] <-1
d$science[d$alsubj2==13] <-1
d$science[d$alsubj2==34] <-1
d$science[d$alsubj2==56] <-1
d$science[d$alsubj2==57] <-1
d$science[d$alsubj2==62] <-1
d$science[d$alsubj1==72] <-1
d$science[d$alsubj3==8] <-1
d$science[d$alsubj3==9] <-1
d$science[d$alsubj3==10] <-1
d$science[d$alsubj3==12] <-1
d$science[d$alsubj3==13] <-1
d$science[d$alsubj3==34] <-1
d$science[d$alsubj3==56] <-1
d$science[d$alsubj3==57] <-1
d$science[d$alsubj3==62] <-1
d$science[d$alsubj3==72] <-1
d$science[d$alsubj4==8] <-1
d$science[d$alsubj4==9] <-1
d$science[d$alsubj4==10] <-1
d$science[d$alsubj4==12] <-1
d$science[d$alsubj4==13] <-1
d$science[d$alsubj4==34] <-1
d$science[d$alsubj4==56] <-1
d$science[d$alsubj4==57] <-1
d$science[d$alsubj4==62] <-1
d$science[d$alsubj4==72] <-1
d$science[d$alsubj5==8] <-1
d$science[d$alsubj5==9] <-1
d$science[d$alsubj5==10] <-1
d$science[d$alsubj5==12] <-1
d$science[d$alsubj5==13] <-1
d$science[d$alsubj5==34] <-1
d$science[d$alsubj5==56] <-1
d$science[d$alsubj5==57] <-1
d$science[d$alsubj5==62] <-1
d$science[d$alsubj5==72] <-1
d$science[d$alsubj6==8] <-1
d$science[d$alsubj6==9] <-1
d$science[d$alsubj6==10] <-1
d$science[d$alsubj6==12] <-1
d$science[d$alsubj6==13] <-1
d$science[d$alsubj6==34] <-1
d$science[d$alsubj6==56] <-1
d$science[d$alsubj6==57] <-1
d$science[d$alsubj6==62] <-1
d$science[d$alsubj6==72] <-1
d$science[d$alsubj7==8] <-1
d$science[d$alsubj7==9] <-1
d$science[d$alsubj7==10] <-1
d$science[d$alsubj7==12] <-1
d$science[d$alsubj7==13] <-1
d$science[d$alsubj7==34] <-1
d$science[d$alsubj7==56] <-1
d$science[d$alsubj7==57] <-1
d$science[d$alsubj7==62] <-1
d$science[d$alsubj7==72] <-1
d$science[d$alsubj8==8] <-1
d$science[d$alsubj8==9] <-1
d$science[d$alsubj8==10] <-1
d$science[d$alsubj8==12] <-1
d$science[d$alsubj8==13] <-1
d$science[d$alsubj8==34] <-1
d$science[d$alsubj8==56] <-1
d$science[d$alsubj8==57] <-1
d$science[d$alsubj8==62] <-1
d$science[d$alsubj8==72] <-1
d$science[d$alsubj9==8] <-1
d$science[d$alsubj9==9] <-1
d$science[d$alsubj9==10] <-1
d$science[d$alsubj9==12] <-1
d$science[d$alsubj9==13] <-1
d$science[d$alsubj9==34] <-1
d$science[d$alsubj9==56] <-1
d$science[d$alsubj9==57] <-1
d$science[d$alsubj9==62] <-1
d$science[d$alsubj9==72] <-1
d$science[d$alsubj10==8] <-1
d$science[d$alsubj10==9] <-1
d$science[d$alsubj10==10] <-1
d$science[d$alsubj10==12] <-1
d$science[d$alsubj10==13] <-1
d$science[d$alsubj10==34] <-1
d$science[d$alsubj10==56] <-1
d$science[d$alsubj10==57] <-1
d$science[d$alsubj10==62] <-1
d$science[d$alsubj10==72] <-1

#Humanities A-level
d$humanities<-NA
d$humanities[d$obs30==1] <- 0
d$humanities[d$alsubj1==25] <-1
d$humanities[d$alsubj1==27] <-1
d$humanities[d$alsubj1==28] <-1
d$humanities[d$alsubj1==35] <-1
d$humanities[d$alsubj1==67] <-1
d$humanities[d$alsubj1==42] <-1
d$humanities[d$alsubj1==38] <-1
d$humanities[d$alsubj1==2] <-1
d$humanities[d$alsubj1==3] <-1
d$humanities[d$alsubj1==4] <-1
d$humanities[d$alsubj1==39] <-1
d$humanities[d$alsubj1==40] <-1
d$humanities[d$alsubj1==60] <-1
d$humanities[d$alsubj1==61] <-1
d$humanities[d$alsubj2==25] <-1
d$humanities[d$alsubj2==27] <-1
d$humanities[d$alsubj2==28] <-1
d$humanities[d$alsubj2==35] <-1
d$humanities[d$alsubj2==67] <-1
d$humanities[d$alsubj2==42] <-1
d$humanities[d$alsubj2==38] <-1
d$humanities[d$alsubj2==2] <-1
d$humanities[d$alsubj2==3] <-1
d$humanities[d$alsubj2==4] <-1
d$humanities[d$alsubj2==39] <-1
d$humanities[d$alsubj2==40] <-1
d$humanities[d$alsubj2==60] <-1
d$humanities[d$alsubj2==61] <-1
d$humanities[d$alsubj3==25] <-1
d$humanities[d$alsubj3==27] <-1
d$humanities[d$alsubj3==28] <-1
d$humanities[d$alsubj3==35] <-1
d$humanities[d$alsubj3==67] <-1
d$humanities[d$alsubj3==42] <-1
d$humanities[d$alsubj3==38] <-1
d$humanities[d$alsubj3==2] <-1
d$humanities[d$alsubj3==3] <-1
d$humanities[d$alsubj3==4] <-1
d$humanities[d$alsubj3==39] <-1
d$humanities[d$alsubj3==40] <-1
d$humanities[d$alsubj3==60] <-1
d$humanities[d$alsubj3==61] <-1
d$humanities[d$alsubj4==25] <-1
d$humanities[d$alsubj4==27] <-1
d$humanities[d$alsubj4==28] <-1
d$humanities[d$alsubj4==35] <-1
d$humanities[d$alsubj4==67] <-1
d$humanities[d$alsubj4==42] <-1
d$humanities[d$alsubj4==38] <-1
d$humanities[d$alsubj4==2] <-1
d$humanities[d$alsubj4==3] <-1
d$humanities[d$alsubj4==4] <-1
d$humanities[d$alsubj4==39] <-1
d$humanities[d$alsubj4==40] <-1
d$humanities[d$alsubj4==60] <-1
d$humanities[d$alsubj4==61] <-1
d$humanities[d$alsubj5==25] <-1
d$humanities[d$alsubj5==27] <-1
d$humanities[d$alsubj5==28] <-1
d$humanities[d$alsubj5==35] <-1
d$humanities[d$alsubj5==67] <-1
d$humanities[d$alsubj5==42] <-1
d$humanities[d$alsubj5==38] <-1
d$humanities[d$alsubj5==2] <-1
d$humanities[d$alsubj5==3] <-1
d$humanities[d$alsubj5==4] <-1
d$humanities[d$alsubj5==39] <-1
d$humanities[d$alsubj5==40] <-1
d$humanities[d$alsubj5==60] <-1
d$humanities[d$alsubj5==61] <-1
d$humanities[d$alsubj6==25] <-1
d$humanities[d$alsubj6==27] <-1
d$humanities[d$alsubj6==28] <-1
d$humanities[d$alsubj6==35] <-1
d$humanities[d$alsubj6==67] <-1
d$humanities[d$alsubj6==42] <-1
d$humanities[d$alsubj6==38] <-1
d$humanities[d$alsubj6==2] <-1
d$humanities[d$alsubj6==3] <-1
d$humanities[d$alsubj6==4] <-1
d$humanities[d$alsubj6==39] <-1
d$humanities[d$alsubj6==40] <-1
d$humanities[d$alsubj6==60] <-1
d$humanities[d$alsubj6==61] <-1
d$humanities[d$alsubj7==25] <-1
d$humanities[d$alsubj7==27] <-1
d$humanities[d$alsubj7==28] <-1
d$humanities[d$alsubj7==35] <-1
d$humanities[d$alsubj7==67] <-1
d$humanities[d$alsubj7==42] <-1
d$humanities[d$alsubj7==38] <-1
d$humanities[d$alsubj7==2] <-1
d$humanities[d$alsubj7==3] <-1
d$humanities[d$alsubj7==4] <-1
d$humanities[d$alsubj7==39] <-1
d$humanities[d$alsubj7==40] <-1
d$humanities[d$alsubj7==60] <-1
d$humanities[d$alsubj7==61] <-1
d$humanities[d$alsubj8==25] <-1
d$humanities[d$alsubj8==27] <-1
d$humanities[d$alsubj8==28] <-1
d$humanities[d$alsubj8==35] <-1
d$humanities[d$alsubj8==67] <-1
d$humanities[d$alsubj8==42] <-1
d$humanities[d$alsubj8==38] <-1
d$humanities[d$alsubj8==2] <-1
d$humanities[d$alsubj8==3] <-1
d$humanities[d$alsubj8==4] <-1
d$humanities[d$alsubj8==39] <-1
d$humanities[d$alsubj8==40] <-1
d$humanities[d$alsubj8==60] <-1
d$humanities[d$alsubj8==61] <-1
d$humanities[d$alsubj9==25] <-1
d$humanities[d$alsubj9==27] <-1
d$humanities[d$alsubj9==28] <-1
d$humanities[d$alsubj9==35] <-1
d$humanities[d$alsubj9==67] <-1
d$humanities[d$alsubj9==42] <-1
d$humanities[d$alsubj9==38] <-1
d$humanities[d$alsubj9==2] <-1
d$humanities[d$alsubj9==3] <-1
d$humanities[d$alsubj9==4] <-1
d$humanities[d$alsubj9==39] <-1
d$humanities[d$alsubj9==40] <-1
d$humanities[d$alsubj9==60] <-1
d$humanities[d$alsubj9==61] <-1
d$humanities[d$alsubj10==25] <-1
d$humanities[d$alsubj10==27] <-1
d$humanities[d$alsubj10==28] <-1
d$humanities[d$alsubj10==35] <-1
d$humanities[d$alsubj10==67] <-1
d$humanities[d$alsubj10==42] <-1
d$humanities[d$alsubj10==38] <-1
d$humanities[d$alsubj10==2] <-1
d$humanities[d$alsubj10==3] <-1
d$humanities[d$alsubj10==4] <-1
d$humanities[d$alsubj10==39] <-1
d$humanities[d$alsubj10==40] <-1
d$humanities[d$alsubj10==60] <-1
d$humanities[d$alsubj10==61] <-1
d$humanities[d$alsubj1==14] <-1
d$humanities[d$alsubj1==15] <-1
d$humanities[d$alsubj2==14] <-1
d$humanities[d$alsubj2==15] <-1
d$humanities[d$alsubj3==14] <-1
d$humanities[d$alsubj3==15] <-1
d$humanities[d$alsubj4==14] <-1
d$humanities[d$alsubj4==15] <-1
d$humanities[d$alsubj5==14] <-1
d$humanities[d$alsubj5==15] <-1
d$humanities[d$alsubj6==14] <-1
d$humanities[d$alsubj6==15] <-1
d$humanities[d$alsubj7==14] <-1
d$humanities[d$alsubj7==15] <-1
d$humanities[d$alsubj8==14] <-1
d$humanities[d$alsubj8==15] <-1
d$humanities[d$alsubj9==14] <-1
d$humanities[d$alsubj9==15] <-1
d$humanities[d$alsubj10==14] <-1
d$humanities[d$alsubj10==15] <-1

#Social Science
d$socialscience<-NA
d$socialscience[d$obs30==1] <- 0
d$socialscience[d$alsubj1==11] <-1
d$socialscience[d$alsubj1==32] <-1
d$socialscience[d$alsubj1==33] <-1
d$socialscience[d$alsubj1==21] <-1
d$socialscience[d$alsubj1==22] <-1
d$socialscience[d$alsubj1==36] <-1
d$socialscience[d$alsubj1==45] <-1
d$socialscience[d$alsubj1==64] <-1
d$socialscience[d$alsubj1==65] <-1
d$socialscience[d$alsubj1==66] <-1
d$socialscience[d$alsubj1==59] <-1
d$socialscience[d$alsubj2==11] <-1
d$socialscience[d$alsubj2==21] <-1
d$socialscience[d$alsubj2==22] <-1
d$socialscience[d$alsubj2==32] <-1
d$socialscience[d$alsubj2==33] <-1
d$socialscience[d$alsubj2==36] <-1
d$socialscience[d$alsubj2==45] <-1
d$socialscience[d$alsubj2==64] <-1
d$socialscience[d$alsubj2==65] <-1
d$socialscience[d$alsubj2==66] <-1
d$socialscience[d$alsubj2==59] <-1
d$socialscience[d$alsubj3==11] <-1
d$socialscience[d$alsubj3==32] <-1
d$socialscience[d$alsubj3==33] <-1
d$socialscience[d$alsubj3==21] <-1
d$socialscience[d$alsubj3==22] <-1
d$socialscience[d$alsubj3==36] <-1
d$socialscience[d$alsubj3==45] <-1
d$socialscience[d$alsubj3==64] <-1
d$socialscience[d$alsubj3==65] <-1
d$socialscience[d$alsubj3==66] <-1
d$socialscience[d$alsubj3==59] <-1
d$socialscience[d$alsubj4==11] <-1
d$socialscience[d$alsubj4==32] <-1
d$socialscience[d$alsubj4==33] <-1
d$socialscience[d$alsubj4==21] <-1
d$socialscience[d$alsubj4==22] <-1
d$socialscience[d$alsubj4==36] <-1
d$socialscience[d$alsubj4==45] <-1
d$socialscience[d$alsubj4==64] <-1
d$socialscience[d$alsubj4==65] <-1
d$socialscience[d$alsubj4==66] <-1
d$socialscience[d$alsubj4==59] <-1
d$socialscience[d$alsubj5==11] <-1
d$socialscience[d$alsubj5==32] <-1
d$socialscience[d$alsubj5==33] <-1
d$socialscience[d$alsubj5==21] <-1
d$socialscience[d$alsubj5==22] <-1
d$socialscience[d$alsubj5==36] <-1
d$socialscience[d$alsubj5==45] <-1
d$socialscience[d$alsubj5==64] <-1
d$socialscience[d$alsubj5==65] <-1
d$socialscience[d$alsubj5==66] <-1
d$socialscience[d$alsubj5==59] <-1
d$socialscience[d$alsubj6==21] <-1
d$socialscience[d$alsubj6==32] <-1
d$socialscience[d$alsubj6==33] <-1
d$socialscience[d$alsubj6==21] <-1
d$socialscience[d$alsubj6==22] <-1
d$socialscience[d$alsubj6==36] <-1
d$socialscience[d$alsubj6==45] <-1
d$socialscience[d$alsubj6==64] <-1
d$socialscience[d$alsubj6==65] <-1
d$socialscience[d$alsubj6==66] <-1
d$socialscience[d$alsubj6==59] <-1
d$socialscience[d$alsubj7==21] <-1
d$socialscience[d$alsubj7==32] <-1
d$socialscience[d$alsubj7==33] <-1
d$socialscience[d$alsubj7==21] <-1
d$socialscience[d$alsubj7==22] <-1
d$socialscience[d$alsubj7==36] <-1
d$socialscience[d$alsubj7==45] <-1
d$socialscience[d$alsubj7==64] <-1
d$socialscience[d$alsubj7==65] <-1
d$socialscience[d$alsubj7==66] <-1
d$socialscience[d$alsubj9==59] <-1
d$socialscience[d$alsubj8==21] <-1
d$socialscience[d$alsubj8==32] <-1
d$socialscience[d$alsubj8==33] <-1
d$socialscience[d$alsubj8==21] <-1
d$socialscience[d$alsubj8==22] <-1
d$socialscience[d$alsubj8==36] <-1
d$socialscience[d$alsubj8==45] <-1
d$socialscience[d$alsubj8==64] <-1
d$socialscience[d$alsubj8==65] <-1
d$socialscience[d$alsubj8==66] <-1
d$socialscience[d$alsubj8==59] <-1
d$socialscience[d$alsubj9==21] <-1
d$socialscience[d$alsubj9==32] <-1
d$socialscience[d$alsubj9==21] <-1
d$socialscience[d$alsubj9==22] <-1
d$socialscience[d$alsubj9==36] <-1
d$socialscience[d$alsubj9==45] <-1
d$socialscience[d$alsubj9==59] <-1
d$socialscience[d$alsubj9==64] <-1
d$socialscience[d$alsubj9==65] <-1
d$socialscience[d$alsubj9==66] <-1
d$socialscience[d$alsubj10==21] <-1
d$socialscience[d$alsubj10==32] <-1
d$socialscience[d$alsubj10==21] <-1
d$socialscience[d$alsubj10==22] <-1
d$socialscience[d$alsubj10==36] <-1
d$socialscience[d$alsubj10==45] <-1
d$socialscience[d$alsubj10==59] <-1
d$socialscience[d$alsubj10==64] <-1
d$socialscience[d$alsubj10==65] <-1
d$socialscience[d$alsubj10==66] <-1

#Other A-level
d$other<-NA
d$other[d$obs30==1] <- 0
d$other[d$alsubj1==5] <-1
d$other[d$alsubj1==6] <-1
d$other[d$alsubj1==7] <-1
d$other[d$alsubj1==26] <-1
d$other[d$alsubj1==31] <-1
d$other[d$alsubj1==37] <-1
d$other[d$alsubj1==48] <-1
d$other[d$alsubj1==49] <-1
d$other[d$alsubj1==50] <-1
d$other[d$alsubj1==55] <-1
d$other[d$alsubj1==68] <-1
d$other[d$alsubj1==69] <-1
d$other[d$alsubj1==19] <-1
d$other[d$alsubj1==20] <-1
d$other[d$alsubj1==23] <-1
d$other[d$alsubj1==24] <-1
d$other[d$alsubj2==5] <-1
d$other[d$alsubj2==6] <-1
d$other[d$alsubj2==7] <-1
d$other[d$alsubj2==26] <-1
d$other[d$alsubj2==31] <-1
d$other[d$alsubj2==37] <-1
d$other[d$alsubj2==48] <-1
d$other[d$alsubj2==49] <-1
d$other[d$alsubj2==50] <-1
d$other[d$alsubj2==55] <-1
d$other[d$alsubj2==68] <-1
d$other[d$alsubj2==69] <-1
d$other[d$alsubj2==19] <-1
d$other[d$alsubj2==20] <-1
d$other[d$alsubj2==23] <-1
d$other[d$alsubj2==24] <-1
d$other[d$alsubj3==5] <-1
d$other[d$alsubj3==6] <-1
d$other[d$alsubj3==7] <-1
d$other[d$alsubj3==26] <-1
d$other[d$alsubj3==31] <-1
d$other[d$alsubj3==37] <-1
d$other[d$alsubj3==48] <-1
d$other[d$alsubj3==49] <-1
d$other[d$alsubj3==50] <-1
d$other[d$alsubj3==55] <-1
d$other[d$alsubj3==68] <-1
d$other[d$alsubj3==69] <-1
d$other[d$alsubj3==19] <-1
d$other[d$alsubj3==20] <-1
d$other[d$alsubj3==23] <-1
d$other[d$alsubj3==24] <-1
d$other[d$alsubj4==5] <-1
d$other[d$alsubj4==6] <-1
d$other[d$alsubj4==7] <-1
d$other[d$alsubj4==26] <-1
d$other[d$alsubj4==31] <-1
d$other[d$alsubj4==37] <-1
d$other[d$alsubj4==48] <-1
d$other[d$alsubj4==49] <-1
d$other[d$alsubj4==50] <-1
d$other[d$alsubj4==55] <-1
d$other[d$alsubj4==68] <-1
d$other[d$alsubj4==69] <-1
d$other[d$alsubj4==19] <-1
d$other[d$alsubj4==20] <-1
d$other[d$alsubj4==23] <-1
d$other[d$alsubj4==24] <-1
d$other[d$alsubj5==5] <-1
d$other[d$alsubj5==6] <-1
d$other[d$alsubj5==7] <-1
d$other[d$alsubj5==26] <-1
d$other[d$alsubj5==31] <-1
d$other[d$alsubj5==37] <-1
d$other[d$alsubj5==48] <-1
d$other[d$alsubj5==49] <-1
d$other[d$alsubj5==50] <-1
d$other[d$alsubj5==55] <-1
d$other[d$alsubj5==68] <-1
d$other[d$alsubj5==69] <-1
d$other[d$alsubj5==19] <-1
d$other[d$alsubj5==20] <-1
d$other[d$alsubj5==23] <-1
d$other[d$alsubj5==24] <-1
d$other[d$alsubj6==5] <-1
d$other[d$alsubj6==6] <-1
d$other[d$alsubj6==7] <-1
d$other[d$alsubj6==26] <-1
d$other[d$alsubj6==31] <-1
d$other[d$alsubj6==37] <-1
d$other[d$alsubj6==48] <-1
d$other[d$alsubj6==49] <-1
d$other[d$alsubj6==50] <-1
d$other[d$alsubj6==55] <-1
d$other[d$alsubj6==68] <-1
d$other[d$alsubj6==69] <-1
d$other[d$alsubj6==19] <-1
d$other[d$alsubj6==20] <-1
d$other[d$alsubj6==23] <-1
d$other[d$alsubj6==24] <-1
d$other[d$alsubj7==5] <-1
d$other[d$alsubj7==6] <-1
d$other[d$alsubj7==7] <-1
d$other[d$alsubj7==26] <-1
d$other[d$alsubj7==31] <-1
d$other[d$alsubj7==37] <-1
d$other[d$alsubj7==48] <-1
d$other[d$alsubj7==49] <-1
d$other[d$alsubj7==50] <-1
d$other[d$alsubj7==55] <-1
d$other[d$alsubj7==68] <-1
d$other[d$alsubj7==69] <-1
d$other[d$alsubj7==19] <-1
d$other[d$alsubj7==20] <-1
d$other[d$alsubj7==23] <-1
d$other[d$alsubj7==24] <-1
d$other[d$alsubj8==5] <-1
d$other[d$alsubj8==6] <-1
d$other[d$alsubj8==7] <-1
d$other[d$alsubj8==26] <-1
d$other[d$alsubj8==31] <-1
d$other[d$alsubj8==37] <-1
d$other[d$alsubj8==48] <-1
d$other[d$alsubj8==49] <-1
d$other[d$alsubj8==50] <-1
d$other[d$alsubj8==55] <-1
d$other[d$alsubj8==68] <-1
d$other[d$alsubj8==69] <-1
d$other[d$alsubj8==19] <-1
d$other[d$alsubj8==20] <-1
d$other[d$alsubj8==23] <-1
d$other[d$alsubj8==24] <-1
d$other[d$alsubj9==5] <-1
d$other[d$alsubj9==6] <-1
d$other[d$alsubj9==7] <-1
d$other[d$alsubj9==26] <-1
d$other[d$alsubj9==31] <-1
d$other[d$alsubj9==37] <-1
d$other[d$alsubj9==48] <-1
d$other[d$alsubj9==49] <-1
d$other[d$alsubj9==50] <-1
d$other[d$alsubj9==55] <-1
d$other[d$alsubj9==68] <-1
d$other[d$alsubj9==69] <-1
d$other[d$alsubj9==19] <-1
d$other[d$alsubj9==20] <-1
d$other[d$alsubj9==23] <-1
d$other[d$alsubj9==24] <-1
d$other[d$alsubj10==5] <-1
d$other[d$alsubj10==6] <-1
d$other[d$alsubj10==7] <-1
d$other[d$alsubj10==26] <-1
d$other[d$alsubj10==31] <-1
d$other[d$alsubj10==37] <-1
d$other[d$alsubj10==48] <-1
d$other[d$alsubj10==49] <-1
d$other[d$alsubj10==50] <-1
d$other[d$alsubj10==55] <-1
d$other[d$alsubj10==68] <-1
d$other[d$alsubj10==69] <-1
d$other[d$alsubj10==19] <-1
d$other[d$alsubj10==20] <-1
d$other[d$alsubj10==23] <-1
d$other[d$alsubj10==24] <-1
d$alevel <-NA
d$alevel[d$obs30==1]<-0
d$alevel[d$alsubj1>=1]<-1
##--------------------------------------------- Dependent variable---------------------------------------------
# Income

summary (d$b7cgropy)
d$b7cgropy[d$b7cgropy<=0] <- NA
d$b7cgropy <-recode(d$b7cgropy, "9999998:9999999=NA")	
d$b7cgropd <-recode(d$b7cgropd, "'Refusal'=NA; 'Not Applicable'=NA;'Some other period (SPECIFY AT NEXT QUESTION)'=NA;'One week'=1;'A fortnight'=2;'Four weeks'=3;'A calendar month'=4;'A year'=5")
d$yearlyearnings34<-NA
d$payfreq <-NA
d$payfreq[d$b7cgropd==1] <-52
d$payfreq[d$b7cgropd==2] <-26
d$payfreq[d$b7cgropd==3] <-13
d$payfreq[d$b7cgropd==4] <-12
d$payfreq[d$b7cgropd==5] <-1
d$yearlyearnings34 <- d$b7cgropy * d$payfreq
summary(d$yearlyearnings34)
# Adjust for inflation
d$yearlyearnings34 <- d$yearlyearnings34*1.34
d$logsalary34<-log(d$yearlyearnings34)

# Auxiliary variables
bcs96income <-read.dta("R:/REVAMP/2013_06_01_Nuffield_REVAMP/Work_Package_Auxilliary_Analyses/WP1_RM_ML_Maths_Premium_Life_Course/cache/income1996.dta")
d1<-merge(d,bcs96income, by="bcsid", all=TRUE)
d<-d1
d$logsalary26 <-log(d$totalyearlygrossinf)	
summary(d$logsalary26)

summary(d$cgropay)
summary(d$cgroprd)
d$cgropay <-recode(d$cgropay, "9999998:9999999=NA")
d$cgroprd[d$cgroprd=="Other period"]<-NA
d$cgroprd[d$cgroprd=="=Dont know"]<-NA
d$cgroprd[d$cgroprd=="=Not answered"]<-NA
d$yearlyearnings30<-NA
d$payfreq <-NA
d$payfreq[d$cgroprd=="One week"] <-52
d$payfreq[d$cgroprd=="A fortnight"] <-26
d$payfreq[d$cgroprd=="Four weeks"] <-13
d$payfreq[d$cgroprd=="A calendar month"] <-12
d$payfreq[d$cgroprd=="A year"] <-1
d$yearlyearnings30 <- d$cgropay * d$payfreq
# Adjust for inflation
d$yearlyearnings30 <- d$yearlyearnings30*1.469
d$logsalary30 <-log(d$yearlyearnings30)
qqnorm (d$logsalary30)

summary(d$b8cgropy)
d$b8cgropy[d$b8cgropy<=0] <- NA
d$b8cgropd <-recode(d$b8cgropd, "'Refusal'=NA; 'Not Applicable'=NA;'Some other period (SPECIFY AT NEXT QUESTION)'=NA;'One week'=1;'A fortnight'=2;'Four weeks'=3;'A calendar month'=4;'A year'=5")
d$yearlyearnings38<-NA
d$payfreq <-NA
d$payfreq[d$b8cgropd==1] <-52
d$payfreq[d$b8cgropd==2] <-26
d$payfreq[d$b8cgropd==3] <-13
d$payfreq[d$b8cgropd==4] <-12
d$payfreq[d$b8cgropd==5] <-1
d$yearlyearnings38 <- d$b8cgropy * d$payfreq
summary(d$yearlyearnings38)
# Adjust for inflation
d$yearlyearnings38 <- d$yearlyearnings38*1.164
d$logsalary38<-log(d$yearlyearnings38)

summary(d$B9GROA)
summary(d$B9GROP)
d$B9GROA <-recode(d$B9GROA, "-9:0=NA")
d$B9GROP[d$B9GROP=="Don't know"] <-NA
d$yearlyearnings42 <-NA
d$payfreq <-NA
d$payfreq[d$B9GROP=="One week"] <-52
d$payfreq[d$B9GROP=="Two weeks"] <-26
d$payfreq[d$B9GROP=="Four weeks"] <-13
d$payfreq[d$B9GROP=="Calendar month"] <-12
d$payfreq[d$B9GROP=="Two calendar months"] <-6
d$payfreq[d$B9GROP=="One year/12 months/52 weeks"] <-1
d$yearlyearnings42 <- d$B9GROA * d$payfreq
summary(d$yearlyearnings42)
d$logsalary42 <-log(d$yearlyearnings42)
summary(d$logsalary42)
qqnorm(d$logsalary42)
d$logsalary42 <- d$logsalary42*1.03	

#-----------------------------------------Omitted Variable Bias Corrections-----------------------------------------
# O-level English Grade
summary(d$t2a1_2)
d$english_olevel <-recode(d$t2a1_2, "'Not asked'=NA;'Not stated'=NA;'No questionnaire'=NA;'Grade A'=5;
			'Grade B'=4; 'Grade C'=3; 'Grade D'=2; 'Grade E'=1;'Fail'=0")
summary(d$english_olevel)

d$english_olevel <-as.numeric(d$english_olevel)
d$english_olevelsq <-d$english_olevel^2
summary(d$english_olevelsq)
# O-level Maths Grade
summary(d$t2c1_2)
d$maths_olevel <-recode(d$t2c1_2, "'Not asked'=NA;'Not stated'=NA;'No questionnaire'=NA;'Grade A'=5;
			'Grade B'=4; 'Grade C'=3; 'Grade D'=2; 'Grade E'=1;'Fail'=0")
d$maths_olevel <-as.numeric(d$maths_olevel)
d$maths_olevelsq <-d$maths_olevel^2
summary(d$maths_olevel)
summary(d$maths_olevelsq)
# Age Father finished education
summary(d$t7_1)
d$father_edfinish <-recode(d$t7_1,"-2=NA;-1=NA")
summary(d$father_edfinish)

# Age Mother finished education
summary(d$t7_2)
d$mother_edfinish <-recode(d$t7_2,"-2=NA;-1=NA")
summary(d$mother_edfinish)

# Mother's employment at age 16
summary(d$t8_2)
d$mother_employment <-recode(d$t8_2, "'Not asked'=NA;'Not stated'=NA;'No questionnaire'=NA;'Regularly employed'='Employed';'Casual/occasional wk'='Employed';
			'Other employment sit'='Employed';'Unemp & seeking work'='Not employed';
			'Sick, will seek work'='Not employed';'Looking after home'='Not employed';
			'Permanently sick'='Not employed';'Full-time student'='Not employed';
			'Retired'='Not employed';'No mother figure'=NA")

#Parental Education aspirations
summary(d$j238)

# Education aspirations
summary(d$jb34c) 
d$post18education <-recode(d$jb34c, "'Not asked'=NA;'Not stated'=NA;'No questionnaire'=NA;'Yes'='Yes';'No'='No'")
d$post18education[d$jb34c=="Don't know"] <-NA 
d$post18education <-as.integer(d$post18education=='Yes')
d$post18education <-as.factor(d$post18education)
summary(d$post18education)

# Occupational Aspirations
summary(d$jb27a1)
d$profocc_asp <-recode(d$jb27a1, "'No questionnaire'=NA; 'First choice'='Yes';'Joint first choice'='Yes';
			'Might do it'='Yes'; 'No response'='No'")
summary(d$profocc_asp)		



#Mixed or Single-Sex School
summary(d$sexsch) 
d$schoolmix <-recode(d$sexsch, "'boys'='single-sex';'girls'='single-sex'")

# School type
summary(d$ssector_n)
d$school <-recode(d$ssector_n, "'lea'='State';'LEA'='State';'independent'='Private';'Special Independent'='Private';
		'special independent'='Private';'voluntary'='State';'Voluntary'='State';'Other Sector'=NA; 'other sector'=NA")
summary(d$school)

## --------------------------------------------- IMPUTATION PREPARATION ------------------------------------------##
#Centring Variables and rescaling
d$c_workexp <- scale(d$workexp,center=TRUE, scale=FALSE)
d$z_workexp <- rescale(d$workexp, "full")
d$c_workexpsq <-scale(d$workexpsq, center=TRUE, scale=FALSE) 
d$z_workexpsq <- rescale(d$workexpsq, "full")
d$c_tenure <-scale(d$cjdurationInMonths, center=TRUE, scale=FALSE)
d$z_tenure <-rescale(d$cjdurationInMonths, "full")
d$c_unemp <-scale(d$unemployment, center=TRUE, scale=FALSE)
d$z_unemp <-rescale(d$unemployment, "full")
d$c_b16maths <-scale(d$mathscore, center=TRUE, scale=FALSE)
d$z_b16maths <-rescale(d$mathscore, "full")
d$c_b16read <- scale(d$BD4RDAGE, center=TRUE, scale=FALSE)
d$z_b16read <-rescale(d$BD4RDAGE, "full")
d$c_b10maths <-scale(d$math_score10, center=TRUE, scale=FALSE)
d$z_b10maths <-rescale(d$math_score10, "full") 
d$c_b10read<- scale(d$read10scores, center=TRUE, scale=FALSE)
d$z_b10read <-rescale(d$read10scores, "full")
d$z_maths_olevel  <-rescale(d$maths_olevel, "full")
d$z_english_olevel <-rescale(d$english_olevel, "full")
d$z_english_olevelsq <-rescale(d$english_olevelsq, "full")
d$z_maths_olevelsq <-rescale(d$maths_olevelsq, "full")

# Convert into factor where appropriate
d$married <-as.factor(d$married)
d$children<-as.factor(d$children)
d$NVQ<-as.factor(d$NVQ)
d$prof<-as.factor(d$prof)
d$highereddip<-as.factor(d$highereddip)
d$mathematics<-as.factor(d$mathematics)
d$science<-as.factor(d$science)
d$humanities<-as.factor(d$humanities)
d$socialscience<-as.factor(d$socialscience)
d$other<-as.factor(d$other)
d$sc26<-as.factor(d$sc26)
d$sc30<-as.factor(d$sc30)
d$sc34<-as.factor(d$sc34)
d$sc38<-as.factor(d$sc38)
d$sc42<-as.factor(d$sc42)
d$married26<-as.factor(d$married26)
d$married30<-as.factor(d$married30)
d$married38<-as.factor(d$married38)
d$married42<-as.factor(d$married42)
d$parttime26<-as.factor(d$parttime26)
d$parttime30<-as.factor(d$parttime30)
d$parttime38<-as.factor(d$parttime38)
d$parttime42<-as.factor(d$parttime42)
d$parttime <-as.integer(d$parttime=="1")
d$parttime<-as.factor(d$parttime)
d$z_father_edfinish <-rescale(d$father_edfinish, "full")
d$z_mother_edfinish <-rescale(d$mother_edfinish, "full")
d$father_edfinish <-NULL
d$mother_edfinish <-NULL
d$logsalary26<-NULL
d$logsalary42<-NULL
d$residence26<-NULL
d$residence38<-NULL
d$residence42<-NULL
d$sc26<-NULL
d$sc42<-NULL
d$married26<-NULL
d$married42 <-NULL
d$parttime26<-NULL
d$parttime42<-NULL
d$working <-as.factor(d$working)
d$alevel <-as.factor(d$alevel)


BCS2004 <-subset(d, select=c(BCS2004, select=c(logsalary26, logsalary30, logsalary34, logsalary38, logsalary42, bd7sex, married, children, residence, degree, NVQ, prof, 
          highereddip, mathematics, science, humanities, socialscience, other,z_workexp,z_workexpsq, z_tenure, z_unemp, z_b10maths, z_b10read, residence26, 
          residence30, residence38, residence42, sc26, sc30, sc34, sc38, sc42, married26, married30, married38, married42, parttime26, parttime30, parttime38, 
          parttime42, parttime, parentsc, schoolmix, school, profocc_asp, post18education, z_english_olevel, z_english_olevelsq, z_maths_olevel,  
          z_maths_olevelsq, father_edfinish, mother_edfinish,mother_employment, working,alevel))
rm(bcs96income, d1, d)



dir.create("cache")		
save.image("~/WP1/cache/bcs2004_WP1.RData")